Skip to main content

bitopro-api-python

Project description

bitopro-api-python

SDK for the BitoPro API.

Bitopro official API document

Installation

pip install bitopro-client

Linux

cd ~/ && git clone https://github.com/bitoex/bitopro-api-python.git
cd ~/bitopro-api-python && cp bitopro/sample_test.py .

# update API key and secret
# vim sample_test.py

python3 sample_test.py

Windows

cd %USERPROFILE%\Downloads
git clone https://github.com/bitoex/bitopro-api-python.git

cd bitopro-api-python
cd bitopro

# update API key and secret
# notepad sample_test.py

python3 sample_test.py

Getting started

Create BitoPro client. Pass api keys only if you are going to do authenticated calls. You can create an api key here.

bitopro_client = BitoproRestfulClient('apiKey', 'apiSecret')

Limitations

Rate Limit

There is rate limits applied to each API, please check API documentation for more detail.

Precisions

Both price and amount are subject to decimal restrictions, please check official settings for more detail.

Minimum order amount

Checkout the official settings of minimum amount.

Public restful enpoint example

from bitopro_restful_client import BitoproRestfulClient, CandlestickResolutin

if __name__ == '__main__':
    bitopro_client = BitoproRestfulClient('apiKey', 'apiSecret')

    '''
    Open restful test
    '''
    # [GET] list of currencies
    response = bitopro_client.get_currencies()
    print("List of currencies: ", response)

    # [GET] limitations and fees
    response = bitopro_client.get_limitations_and_fees()
    print("List of currencies: ", response)

    # [GET] order book
    pair = "BTC_USDT"
    response = bitopro_client.get_order_book(pair)
    print("Order book: ", response)

    # [GET] tickers
    response = bitopro_client.get_tickers(pair)
    print("Tickers: ", response)

    # [GET] trades
    response = bitopro_client.get_trades(pair)
    print("Trades: ", response)

    # [GET] candlestick
    response = bitopro_client.get_candlestick(pair, CandlestickResolutin._1d, 1650707415, 1678355415)
    print("Candlestick: ", response)

    # [GET] trading pairs
    response = bitopro_client.get_trading_pairs()
    print("Trading pairs: ", response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitopro-1.0.3.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

bitopro-1.0.3-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page