Stocks Exchange

class stocksexchange.StocksExchange(api_base='https://stocks.exchange/api2/')[source]
get_grafic(currency1='STAK', currency2='BTC', interval='1D', order='ASC', count=100)[source]

Fetch the grafic for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Param:

string interval: Interval of the grafic to return, default 1D. (ex. 20D, 3M, 1Y)

Param:

string order: Order to return the results in (ASC, DEC) default = ASC

Param:

int count: The number of results to return

Returns:

Grafic for currency pair

get_market_summary(currency1='STAK', currency2='BTC')[source]

Fetch the market summary for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Returns:

Market summary for currency pair

get_orderbook(currency1='STAK', currency2='BTC')[source]

Fetch the orderbook for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Returns:

Order book for currency pair

get_price(currency1='STAK', currency2='BTC')[source]

Fetch the price for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Returns:

Price for currency pair

get_ticker(currency1='STAK', currency2='BTC')[source]

Fetch the ticker for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Returns:

Ticker for currency pair

get_trade_history(currency1='STAK', currency2='BTC')[source]

Fetch the trade history for currency1/currency2 pair from stocks exchange

Parameters:
  • currency1 (string) – Symbol of first currency in pair
  • currency2 (string) – Symbol of second currency in pair
Returns:

Trade history for currency pair