Skip to content

nomadAl/bitforex_simple_exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

BitForex Simple request lib

Python simple bitforex exchange requests library

Dependencies: requests

Generic Request

Exchange()\
.build_request('POST', '/fund/allAccount')
.finalize()

{'data': [{'active': 0, 'currency': 'btc', 'fix': 0, 'frozen': 0},
  {'active': 0, 'currency': 'eth', 'fix': 0, 'frozen': 0},
...
  {'active': 0, 'currency': 'ron', 'fix': 0, 'frozen': 0}],
 'success': True,
 'time': 1570969672516
}

Request pieces

Using BitForex example

Exchange(log_level=logging.DEBUG)\
.with_keys(access_key='fd91cd9ba2cc78fed6bb40e0bcff29ba',
                    secret_key='82f192d903f363f22a031dfdbbeaf851')\
.with_params(amount=1, 
             nonce=1501234567890, 
             price=1000, 
             symbol='coin-usd-eth', 
             tradeType=1)\
.with_segment('/trade/placeOrder')\
.test()

Output:

DEBUG:bitforex:API str /api/v1/trade/placeOrder?accessKey=fd91cd9ba2cc78fed6bb40e0bcff29ba&amount=1&nonce=1501234567890&price=1000&symbol=coin-usd-eth&tradeType=1
DEBUG:bitforex:Endpoint https://api.bitforex.com/api/v1/trade/placeOrder
DEBUG:bitforex:Path str /api/v1/trade/placeOrder
DEBUG:bitforex:Query str accessKey=fd91cd9ba2cc78fed6bb40e0bcff29ba&amount=1&nonce=1501234567890&price=1000&symbol=coin-usd-eth&tradeType=1
DEBUG:bitforex:FURL https://api.bitforex.com/api/v1/trade/placeOrder?accessKey=fd91cd9ba2cc78fed6bb40e0bcff29ba&amount=1&nonce=1501234567890&price=1000&signData=2a0a848d76920a425190c5f2c509b45ef730956fac5331c79a988671223fd367&symbol=coin-usd-eth&tradeType=1

About

Python simple bitforex exchange requests library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages