Git Product home page Git Product logo

borsaapi's Introduction

borsaAPI

an api that allows you to access data related to BIST stock market stocks using the java language.

Getting Started

The latest jar can be downloaded from the releases page.

If you use Maven for Dependency management, you can include this using below dependency.

<dependency>
  <groupId>com.github.pocan</groupId>
  <artifactId>borsaAPI</artifactId>
  <version>1.0.0</version>
</dependency>

Avaliable Methods

getCurrentlyPrice(); // @return Get currently price of the stock symbol.
getCurrentlyRate(); // @return Get currently rate of the stock symbol.
getCurrentlyLossOfPrice(); // @return Get currently loss of price the stock symbol.
getLatestUpdateTime(); // @return Get currently latest update time of the stock symbol.
getStockSymbolName(); // @return Get stock symbol name.

Exceptions

  • StockSymbolCantFindException - > This exception catchs when you will write a unvalid stock symbol check all stock symbol names in here

Usage

import com.github.pocan.borsaAPI.StockExchange;
import com.github.pocan.borsaAPI.StockSymbol;

public class Main {

    public static void main(String[] args) {

        StockSymbol stockSymbol = new StockSymbol("TABGD");
        StockExchange stockExchange = new StockExchange(stockSymbol);

        String stockSymbolName = stockExchange.getStockSymbolName();
        String price = stockExchange.getCurrentlyPrice();
        String latestUpdate = stockExchange.getLatestUpdateTime();
        String rate = stockExchange.getCurrentlyRate();
        String loss = stockExchange.getCurrentlyLossOfPrice();

        System.out.println("Symbol -> " + stockSymbolName);
        System.out.println("Price -> " + price + " TRY");
        System.out.println("Rate -> %" + rate);
        System.out.println("Latest Update Time -> " + latestUpdate);
        System.out.println("Loss > " + loss + " TRY");
        
    }
}

Output

Symbol -> TABGD
Price -> 180,7 TRY
Rate -> %-0,99
Latest Update Time -> 18:09
Loss > -1.8 TRY

borsaapi's People

Contributors

pocanistaken avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hamza-gun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.