bitmart 0.0.16__py3-none-any.whl → 0.0.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bitmart might be problematic. Click here for more details.

@@ -0,0 +1,306 @@
1
+ Metadata-Version: 2.4
2
+ Name: bitmart
3
+ Version: 0.0.17
4
+ Summary: bitmart crypto exchange api client
5
+ Project-URL: Homepage, https://github.com/ccxt/ccxt
6
+ Project-URL: Issues, https://github.com/ccxt/ccxt
7
+ Author-email: CCXT <info@ccxt.trade>
8
+ License: MIT
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Financial and Insurance Industry
11
+ Classifier: Intended Audience :: Information Technology
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Office/Business :: Financial :: Investment
16
+ Classifier: Topic :: Software Development :: Build Tools
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+
20
+ # bitmart-python
21
+ Python SDK (sync and async) for Bitmart cryptocurrency exchange with Rest and WS capabilities.
22
+
23
+ You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/bitmart)
24
+ You can check Bitmart's docs here: [Docs](https://ccxt.com)
25
+
26
+
27
+ ## Installation
28
+
29
+ ```
30
+ pip install __PYTHON_PACKAGE_NAME__
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Sync
36
+
37
+ ```Python
38
+ from bitmart import BitmartSync
39
+
40
+ def main():
41
+ instance = BitmartSync({})
42
+ ob = instance.fetch_order_book("BTC/USDC")
43
+ print(ob)
44
+ #
45
+ # balance = instance.fetch_balance()
46
+ # order = instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
47
+ ```
48
+
49
+ ### Async
50
+
51
+ ```Python
52
+ import asyncio
53
+ from bitmart import BitmartAsync
54
+
55
+ async def main():
56
+ instance = BitmartAsync({})
57
+ ob = await instance.fetch_order_book("BTC/USDC")
58
+ print(ob)
59
+ #
60
+ # balance = await instance.fetch_balance()
61
+ # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
62
+
63
+ asyncio.run(main())
64
+ ```
65
+
66
+
67
+
68
+ ### Websockets
69
+
70
+ ```Python
71
+ from bitmart import BitmartWs
72
+
73
+ async def main():
74
+ instance = BitmartWs({})
75
+ while True:
76
+ ob = await instance.watch_order_book("BTC/USDC")
77
+ print(ob)
78
+ # orders = await instance.watch_orders("BTC/USDC")
79
+ ```
80
+
81
+
82
+
83
+
84
+
85
+ #### Raw call
86
+
87
+ You can also construct custom requests to available "implicit" endpoints
88
+
89
+ ```Python
90
+ request = {
91
+ 'type': 'candleSnapshot',
92
+ 'req': {
93
+ 'coin': coin,
94
+ 'interval': tf,
95
+ 'startTime': since,
96
+ 'endTime': until,
97
+ },
98
+ }
99
+ response = await instance.public_post_info(request)
100
+ ```
101
+
102
+
103
+
104
+
105
+ ## Available methods
106
+
107
+ ### REST Unified
108
+
109
+ - `create_market_buy_order_with_cost(self, symbol: str, cost: float, params={})`
110
+ - `create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
111
+ - `create_orders(self, orders: List[OrderRequest], params={})`
112
+ - `create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
113
+ - `create_swap_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
114
+ - `fetch_balance(self, params={})`
115
+ - `fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
116
+ - `fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
117
+ - `fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
118
+ - `fetch_contract_markets(self, params={})`
119
+ - `fetch_currencies(self, params={})`
120
+ - `fetch_deposit_address(self, code: str, params={})`
121
+ - `fetch_deposit_withdraw_fee(self, code: str, params={})`
122
+ - `fetch_deposit(self, id: str, code: Str = None, params={})`
123
+ - `fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
124
+ - `fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
125
+ - `fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
126
+ - `fetch_funding_rate(self, symbol: str, params={})`
127
+ - `fetch_isolated_borrow_rate(self, symbol: str, params={})`
128
+ - `fetch_isolated_borrow_rates(self, params={})`
129
+ - `fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
130
+ - `fetch_markets(self, params={})`
131
+ - `fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
132
+ - `fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
133
+ - `fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
134
+ - `fetch_open_interest(self, symbol: str, params={})`
135
+ - `fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
136
+ - `fetch_order_book(self, symbol: str, limit: Int = None, params={})`
137
+ - `fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
138
+ - `fetch_order(self, id: str, symbol: Str = None, params={})`
139
+ - `fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
140
+ - `fetch_position(self, symbol: str, params={})`
141
+ - `fetch_positions(self, symbols: Strings = None, params={})`
142
+ - `fetch_spot_markets(self, params={})`
143
+ - `fetch_status(self, params={})`
144
+ - `fetch_ticker(self, symbol: str, params={})`
145
+ - `fetch_tickers(self, symbols: Strings = None, params={})`
146
+ - `fetch_time(self, params={})`
147
+ - `fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
148
+ - `fetch_trading_fee(self, symbol: str, params={})`
149
+ - `fetch_transaction_fee(self, code: str, params={})`
150
+ - `fetch_transactions_by_type(self, type, code: Str = None, since: Int = None, limit: Int = None, params={})`
151
+ - `fetch_transactions_request(self, flowType: Int = None, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
152
+ - `fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
153
+ - `fetch_withdraw_addresses(self, code: str, note=None, networkCode=None, params={})`
154
+ - `fetch_withdrawal(self, id: str, code: Str = None, params={})`
155
+ - `fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
156
+ - `borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={})`
157
+ - `cancel_all_orders(self, symbol: Str = None, params={})`
158
+ - `cancel_order(self, id: str, symbol: Str = None, params={})`
159
+ - `cancel_orders(self, ids: List[str], symbol: Str = None, params={})`
160
+ - `custom_parse_balance(self, response, marketType)`
161
+ - `describe(self)`
162
+ - `edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={})`
163
+ - `get_currency_id_from_code_and_network(self, currencyCode: Str, networkCode: Str)`
164
+ - `nonce(self)`
165
+ - `repay_isolated_margin(self, symbol: str, code: str, amount, params={})`
166
+ - `set_leverage(self, leverage: Int, symbol: Str = None, params={})`
167
+ - `transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={})`
168
+ - `withdraw(self, code: str, amount: float, address: str, tag=None, params={})`
169
+
170
+ ### REST Raw
171
+
172
+ - `public_get_system_time(request)`
173
+ - `public_get_system_service(request)`
174
+ - `public_get_spot_v1_currencies(request)`
175
+ - `public_get_spot_v1_symbols(request)`
176
+ - `public_get_spot_v1_symbols_details(request)`
177
+ - `public_get_spot_quotation_v3_tickers(request)`
178
+ - `public_get_spot_quotation_v3_ticker(request)`
179
+ - `public_get_spot_quotation_v3_lite_klines(request)`
180
+ - `public_get_spot_quotation_v3_klines(request)`
181
+ - `public_get_spot_quotation_v3_books(request)`
182
+ - `public_get_spot_quotation_v3_trades(request)`
183
+ - `public_get_spot_v1_ticker(request)`
184
+ - `public_get_spot_v2_ticker(request)`
185
+ - `public_get_spot_v1_ticker_detail(request)`
186
+ - `public_get_spot_v1_steps(request)`
187
+ - `public_get_spot_v1_symbols_kline(request)`
188
+ - `public_get_spot_v1_symbols_book(request)`
189
+ - `public_get_spot_v1_symbols_trades(request)`
190
+ - `public_get_contract_v1_tickers(request)`
191
+ - `public_get_contract_public_details(request)`
192
+ - `public_get_contract_public_depth(request)`
193
+ - `public_get_contract_public_open_interest(request)`
194
+ - `public_get_contract_public_funding_rate(request)`
195
+ - `public_get_contract_public_funding_rate_history(request)`
196
+ - `public_get_contract_public_kline(request)`
197
+ - `public_get_account_v1_currencies(request)`
198
+ - `public_get_contract_public_markprice_kline(request)`
199
+ - `private_get_account_sub_account_v1_transfer_list(request)`
200
+ - `private_get_account_sub_account_v1_transfer_history(request)`
201
+ - `private_get_account_sub_account_main_v1_wallet(request)`
202
+ - `private_get_account_sub_account_main_v1_subaccount_list(request)`
203
+ - `private_get_account_contract_sub_account_main_v1_wallet(request)`
204
+ - `private_get_account_contract_sub_account_main_v1_transfer_list(request)`
205
+ - `private_get_account_contract_sub_account_v1_transfer_history(request)`
206
+ - `private_get_account_v1_wallet(request)`
207
+ - `private_get_account_v1_currencies(request)`
208
+ - `private_get_spot_v1_wallet(request)`
209
+ - `private_get_account_v1_deposit_address(request)`
210
+ - `private_get_account_v1_withdraw_charge(request)`
211
+ - `private_get_account_v2_deposit_withdraw_history(request)`
212
+ - `private_get_account_v1_deposit_withdraw_detail(request)`
213
+ - `private_get_account_v1_withdraw_address_list(request)`
214
+ - `private_get_spot_v1_order_detail(request)`
215
+ - `private_get_spot_v2_orders(request)`
216
+ - `private_get_spot_v1_trades(request)`
217
+ - `private_get_spot_v2_trades(request)`
218
+ - `private_get_spot_v3_orders(request)`
219
+ - `private_get_spot_v2_order_detail(request)`
220
+ - `private_get_spot_v1_margin_isolated_borrow_record(request)`
221
+ - `private_get_spot_v1_margin_isolated_repay_record(request)`
222
+ - `private_get_spot_v1_margin_isolated_pairs(request)`
223
+ - `private_get_spot_v1_margin_isolated_account(request)`
224
+ - `private_get_spot_v1_trade_fee(request)`
225
+ - `private_get_spot_v1_user_fee(request)`
226
+ - `private_get_spot_v1_broker_rebate(request)`
227
+ - `private_get_contract_private_assets_detail(request)`
228
+ - `private_get_contract_private_order(request)`
229
+ - `private_get_contract_private_order_history(request)`
230
+ - `private_get_contract_private_position(request)`
231
+ - `private_get_contract_private_get_open_orders(request)`
232
+ - `private_get_contract_private_current_plan_order(request)`
233
+ - `private_get_contract_private_trades(request)`
234
+ - `private_get_contract_private_position_risk(request)`
235
+ - `private_get_contract_private_affilate_rebate_list(request)`
236
+ - `private_get_contract_private_affilate_trade_list(request)`
237
+ - `private_get_contract_private_transaction_history(request)`
238
+ - `private_post_account_sub_account_main_v1_sub_to_main(request)`
239
+ - `private_post_account_sub_account_sub_v1_sub_to_main(request)`
240
+ - `private_post_account_sub_account_main_v1_main_to_sub(request)`
241
+ - `private_post_account_sub_account_sub_v1_sub_to_sub(request)`
242
+ - `private_post_account_sub_account_main_v1_sub_to_sub(request)`
243
+ - `private_post_account_contract_sub_account_main_v1_sub_to_main(request)`
244
+ - `private_post_account_contract_sub_account_main_v1_main_to_sub(request)`
245
+ - `private_post_account_contract_sub_account_sub_v1_sub_to_main(request)`
246
+ - `private_post_account_v1_withdraw_apply(request)`
247
+ - `private_post_spot_v1_submit_order(request)`
248
+ - `private_post_spot_v1_batch_orders(request)`
249
+ - `private_post_spot_v2_cancel_order(request)`
250
+ - `private_post_spot_v1_cancel_orders(request)`
251
+ - `private_post_spot_v4_query_order(request)`
252
+ - `private_post_spot_v4_query_client_order(request)`
253
+ - `private_post_spot_v4_query_open_orders(request)`
254
+ - `private_post_spot_v4_query_history_orders(request)`
255
+ - `private_post_spot_v4_query_trades(request)`
256
+ - `private_post_spot_v4_query_order_trades(request)`
257
+ - `private_post_spot_v4_cancel_orders(request)`
258
+ - `private_post_spot_v4_cancel_all(request)`
259
+ - `private_post_spot_v4_batch_orders(request)`
260
+ - `private_post_spot_v3_cancel_order(request)`
261
+ - `private_post_spot_v2_batch_orders(request)`
262
+ - `private_post_spot_v2_submit_order(request)`
263
+ - `private_post_spot_v1_margin_submit_order(request)`
264
+ - `private_post_spot_v1_margin_isolated_borrow(request)`
265
+ - `private_post_spot_v1_margin_isolated_repay(request)`
266
+ - `private_post_spot_v1_margin_isolated_transfer(request)`
267
+ - `private_post_account_v1_transfer_contract_list(request)`
268
+ - `private_post_account_v1_transfer_contract(request)`
269
+ - `private_post_contract_private_submit_order(request)`
270
+ - `private_post_contract_private_cancel_order(request)`
271
+ - `private_post_contract_private_cancel_orders(request)`
272
+ - `private_post_contract_private_submit_plan_order(request)`
273
+ - `private_post_contract_private_cancel_plan_order(request)`
274
+ - `private_post_contract_private_submit_leverage(request)`
275
+ - `private_post_contract_private_submit_tp_sl_order(request)`
276
+ - `private_post_contract_private_modify_plan_order(request)`
277
+ - `private_post_contract_private_modify_preset_plan_order(request)`
278
+ - `private_post_contract_private_modify_tp_sl_order(request)`
279
+ - `private_post_contract_private_submit_trail_order(request)`
280
+ - `private_post_contract_private_cancel_trail_order(request)`
281
+
282
+ ### WS Unified
283
+
284
+ - `describe(self)`
285
+ - `subscribe(self, channel, symbol, type, params={})`
286
+ - `subscribe_multiple(self, channel: str, type: str, symbols: Strings = None, params={})`
287
+ - `watch_balance(self, params={})`
288
+ - `set_balance_cache(self, client: Client, type, subscribeHash)`
289
+ - `load_balance_snapshot(self, client, messageHash, type)`
290
+ - `watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
291
+ - `watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={})`
292
+ - `get_params_for_multiple_sub(self, methodName: str, symbols: List[str], limit: Int = None, params={})`
293
+ - `watch_ticker(self, symbol: str, params={})`
294
+ - `watch_tickers(self, symbols: Strings = None, params={})`
295
+ - `watch_bids_asks(self, symbols: Strings = None, params={})`
296
+ - `watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
297
+ - `watch_positions(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={})`
298
+ - `watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
299
+ - `watch_order_book(self, symbol: str, limit: Int = None, params={})`
300
+ - `watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={})`
301
+ - `authenticate(self, type, params={})`
302
+
303
+ ## Contribution
304
+ - Give us a star :star:
305
+ - Fork and Clone! Awesome
306
+ - Select existing issues or create a new issue.
@@ -283,6 +283,6 @@ bitmart/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWn
283
283
  bitmart/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
284
284
  bitmart/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
285
  bitmart/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
286
- bitmart-0.0.16.dist-info/METADATA,sha256=M9jTsk-R8okkI9_ADTYrjcdNtJgJXy29utcLXDZbYys,2104
287
- bitmart-0.0.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
288
- bitmart-0.0.16.dist-info/RECORD,,
286
+ bitmart-0.0.17.dist-info/METADATA,sha256=aQ5ro0Byi6awKp54GW9il3_g1rqzAjr_GAXrPI5-74U,14164
287
+ bitmart-0.0.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
288
+ bitmart-0.0.17.dist-info/RECORD,,
@@ -1,79 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: bitmart
3
- Version: 0.0.16
4
- Summary: bitmart crypto exchange api client
5
- Project-URL: Homepage, https://github.com/ccxt/ccxt
6
- Project-URL: Issues, https://github.com/ccxt/ccxt
7
- Author-email: CCXT <info@ccxt.trade>
8
- License: MIT
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Intended Audience :: Financial and Insurance Industry
11
- Classifier: Intended Audience :: Information Technology
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Office/Business :: Financial :: Investment
16
- Classifier: Topic :: Software Development :: Build Tools
17
- Requires-Python: >=3.8
18
- Description-Content-Type: text/markdown
19
-
20
- # bitmart-python
21
- Python SDK (sync and async) for Bitmart cryptocurrency exchange with Rest and WS capabilities.
22
-
23
- You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/bitmart)
24
- You can check Bitmart's docs here: [Docs](https://ccxt.com)
25
-
26
- *This package derives from CCXT and allows you to call pretty much every endpoint by either using the unified CCXT API or calling the endpoints directly*
27
-
28
- ## Installation
29
-
30
- ```
31
- pip install bitmart
32
- ```
33
-
34
- ## Usage
35
-
36
- ### Sync
37
-
38
- ```Python
39
- from bitmart import BitmartSync
40
-
41
- def main():
42
- instance = BitmartSync({})
43
- ob = instance.fetch_order_book("BTC/USDC")
44
- print(ob)
45
- #
46
- # balance = instance.fetch_balance()
47
- # order = instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
48
- ```
49
-
50
- ### Async
51
-
52
- ```Python
53
- import asyncio
54
- from bitmart import BitmartAsync
55
-
56
- async def main():
57
- instance = BitmartAsync({})
58
- ob = await instance.fetch_order_book("BTC/USDC")
59
- print(ob)
60
- #
61
- # balance = await instance.fetch_balance()
62
- # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
63
-
64
- asyncio.run(main())
65
- ```
66
-
67
- ### Websockets
68
-
69
- ```Python
70
- from bitmart import BitmartWs
71
-
72
- async def main():
73
- instance = BitmartWs({})
74
- while True:
75
- ob = await instance.watch_order_book("BTC/USDC")
76
- print(ob)
77
- # orders = await instance.watch_orders("BTC/USDC")
78
- ```
79
-