11python-bittrex
22==============
33
4- [ ![ Build Status] ( https://travis-ci.org/ericsomdahl/python-bittrex.svg?branch=travis-setup )] ( https://travis-ci.org/ericsomdahl/python-bittrex )
4+ [ ![ Build Status] ( https://travis-ci.org/ericsomdahl/python-bittrex.svg?branch=master )] ( https://travis-ci.org/ericsomdahl/python-bittrex )
55
66Python bindings for bittrex. I am Not associated -- use at your own risk, etc.
77
@@ -10,17 +10,19 @@ Tips are appreciated:
1010* LTC: LaasG9TRa9p32noN2oKUVVqrDFp4Ja1NK3
1111
1212
13- Example Usage
13+ Example Usage for Bittrex API
1414-------------
1515
1616``` python
1717from bittrex import Bittrex
1818
19- my_bittrex = Bittrex(None , None )
19+ my_bittrex = Bittrex(None , None , api_version = API_V2_0 ) # or defaulting to v1.1 as Bittrex(None, None )
2020my_bittrex.get_markets()
2121{' success' : True , ' message' : ' ' , ' result' : [{' MarketCurrency' : ' LTC' , ...
2222```
2323
24+ API_V2_0 and API_V1_1 are constants that can be imported from Bittrex.
25+
2426To access account methods, an API key for your account is required and can be
2527generated on the `Settings` then `API Keys` page.
2628Make sure you save the secret, as it will not be visible
@@ -29,7 +31,7 @@ after navigating away from the page.
2931```python
3032from bittrex import Bittrex
3133
32- my_bittrex = Bittrex(" <my_api_key>" , " <my_api_secret>" )
34+ my_bittrex = Bittrex(" <my_api_key>" , " <my_api_secret>" , api_version = " <API_V1_1> or <API_V2_0> " )
3335
3436my_bittrex.get_balance(' ETH' )
3537{' success' : True ,
@@ -39,6 +41,39 @@ my_bittrex.get_balance('ETH')
3941}
4042```
4143
44+ v1.1 constants of interest:
45+ -- -
46+ ```
47+ BUY_ORDERBOOK = ' buy'
48+ SELL_ORDERBOOK = ' sell'
49+ BOTH_ORDERBOOK = ' both'
50+ ```
51+
52+ v2.0 constants of interest
53+ -- -
54+ These are used by get_candles()
55+ ```
56+ TICKINTERVAL_ONEMIN = ' oneMin'
57+ TICKINTERVAL_FIVEMIN = ' fiveMin'
58+ TICKINTERVAL_HOUR = ' hour'
59+ TICKINTERVAL_THIRTYMIN = ' thirtyMin'
60+ TICKINTERVAL_DAY = ' Day'
61+ ```
62+ these are used by trade_sell() and trade_buy()
63+ ```
64+ ORDERTYPE_LIMIT = ' LIMIT'
65+ ORDERTYPE_MARKET = ' MARKET'
66+
67+ TIMEINEFFECT_GOOD_TIL_CANCELLED = ' GOOD_TIL_CANCELLED'
68+ TIMEINEFFECT_IMMEDIATE_OR_CANCEL = ' IMMEDIATE_OR_CANCEL'
69+ TIMEINEFFECT_FILL_OR_KILL = ' FILL_OR_KILL'
70+
71+ CONDITIONTYPE_NONE = ' NONE'
72+ CONDITIONTYPE_GREATER_THAN = ' GREATER_THAN'
73+ CONDITIONTYPE_LESS_THAN = ' LESS_THAN'
74+ CONDITIONTYPE_STOP_LOSS_FIXED = ' STOP_LOSS_FIXED'
75+ CONDITIONTYPE_STOP_LOSS_PERCENTAGE = ' STOP_LOSS_PERCENTAGE'
76+ ```
4277
4378Testing
4479------ -
0 commit comments