mexc-exchange-api 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 mexc-exchange-api might be problematic. Click here for more details.
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mexc-exchange-api
|
|
3
|
+
Version: 0.0.17
|
|
4
|
+
Summary: mexc 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
|
+
# mexc-python
|
|
21
|
+
Python SDK (sync and async) for Mexc cryptocurrency exchange with Rest and WS capabilities.
|
|
22
|
+
|
|
23
|
+
You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/mexc)
|
|
24
|
+
You can check Mexc'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 mexc import MexcSync
|
|
39
|
+
|
|
40
|
+
def main():
|
|
41
|
+
instance = MexcSync({})
|
|
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 mexc import MexcAsync
|
|
54
|
+
|
|
55
|
+
async def main():
|
|
56
|
+
instance = MexcAsync({})
|
|
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 mexc import MexcWs
|
|
72
|
+
|
|
73
|
+
async def main():
|
|
74
|
+
instance = MexcWs({})
|
|
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_deposit_address(self, code: str, params={})`
|
|
110
|
+
- `create_market_buy_order_with_cost(self, symbol: str, cost: float, params={})`
|
|
111
|
+
- `create_market_sell_order_with_cost(self, symbol: str, cost: float, params={})`
|
|
112
|
+
- `create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
|
|
113
|
+
- `create_orders(self, orders: List[OrderRequest], params={})`
|
|
114
|
+
- `create_spot_order_request(self, market, type, side, amount, price=None, marginMode=None, params={})`
|
|
115
|
+
- `create_spot_order(self, market, type, side, amount, price=None, marginMode=None, params={})`
|
|
116
|
+
- `create_swap_order(self, market, type, side, amount, price=None, marginMode=None, params={})`
|
|
117
|
+
- `fetch_account_helper(self, type, params)`
|
|
118
|
+
- `fetch_accounts(self, params={})`
|
|
119
|
+
- `fetch_balance(self, params={})`
|
|
120
|
+
- `fetch_bids_asks(self, symbols: Strings = None, params={})`
|
|
121
|
+
- `fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
122
|
+
- `fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
123
|
+
- `fetch_currencies(self, params={})`
|
|
124
|
+
- `fetch_deposit_address(self, code: str, params={})`
|
|
125
|
+
- `fetch_deposit_addresses_by_network(self, code: str, params={})`
|
|
126
|
+
- `fetch_deposit_withdraw_fees(self, codes: Strings = None, params={})`
|
|
127
|
+
- `fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
128
|
+
- `fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
129
|
+
- `fetch_funding_interval(self, symbol: str, params={})`
|
|
130
|
+
- `fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
131
|
+
- `fetch_funding_rate(self, symbol: str, params={})`
|
|
132
|
+
- `fetch_leverage_tiers(self, symbols: Strings = None, params={})`
|
|
133
|
+
- `fetch_leverage(self, symbol: str, params={})`
|
|
134
|
+
- `fetch_markets(self, params={})`
|
|
135
|
+
- `fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
136
|
+
- `fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
|
|
137
|
+
- `fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
138
|
+
- `fetch_order_book(self, symbol: str, limit: Int = None, params={})`
|
|
139
|
+
- `fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
140
|
+
- `fetch_order(self, id: str, symbol: Str = None, params={})`
|
|
141
|
+
- `fetch_orders_by_ids(self, ids, symbol: Str = None, params={})`
|
|
142
|
+
- `fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
143
|
+
- `fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
144
|
+
- `fetch_position_mode(self, symbol: Str = None, params={})`
|
|
145
|
+
- `fetch_position(self, symbol: str, params={})`
|
|
146
|
+
- `fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={})`
|
|
147
|
+
- `fetch_positions(self, symbols: Strings = None, params={})`
|
|
148
|
+
- `fetch_spot_markets(self, params={})`
|
|
149
|
+
- `fetch_status(self, params={})`
|
|
150
|
+
- `fetch_swap_markets(self, params={})`
|
|
151
|
+
- `fetch_ticker(self, symbol: str, params={})`
|
|
152
|
+
- `fetch_tickers(self, symbols: Strings = None, params={})`
|
|
153
|
+
- `fetch_time(self, params={})`
|
|
154
|
+
- `fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
|
|
155
|
+
- `fetch_trading_fee(self, symbol: str, params={})`
|
|
156
|
+
- `fetch_transaction_fees(self, codes: Strings = None, params={})`
|
|
157
|
+
- `fetch_transfer(self, id: str, code: Str = None, params={})`
|
|
158
|
+
- `fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
159
|
+
- `fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
160
|
+
- `add_margin(self, symbol: str, amount: float, params={})`
|
|
161
|
+
- `cancel_all_orders(self, symbol: Str = None, params={})`
|
|
162
|
+
- `cancel_order(self, id: str, symbol: Str = None, params={})`
|
|
163
|
+
- `cancel_orders(self, ids, symbol: Str = None, params={})`
|
|
164
|
+
- `custom_parse_balance(self, response, marketType)`
|
|
165
|
+
- `describe(self)`
|
|
166
|
+
- `modify_margin_helper(self, symbol: str, amount, addOrReduce, params={})`
|
|
167
|
+
- `nonce(self)`
|
|
168
|
+
- `reduce_margin(self, symbol: str, amount: float, params={})`
|
|
169
|
+
- `set_leverage(self, leverage: Int, symbol: Str = None, params={})`
|
|
170
|
+
- `set_margin_mode(self, marginMode: str, symbol: Str = None, params={})`
|
|
171
|
+
- `set_position_mode(self, hedged: bool, symbol: Str = None, params={})`
|
|
172
|
+
- `synthetic_trade_id(self, market=None, timestamp=None, side=None, amount=None, price=None, orderType=None, takerOrMaker=None)`
|
|
173
|
+
- `transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={})`
|
|
174
|
+
- `withdraw(self, code: str, amount: float, address: str, tag=None, params={})`
|
|
175
|
+
|
|
176
|
+
### REST Raw
|
|
177
|
+
|
|
178
|
+
- `spot_public_get_ping(request)`
|
|
179
|
+
- `spot_public_get_time(request)`
|
|
180
|
+
- `spot_public_get_exchangeinfo(request)`
|
|
181
|
+
- `spot_public_get_depth(request)`
|
|
182
|
+
- `spot_public_get_trades(request)`
|
|
183
|
+
- `spot_public_get_historicaltrades(request)`
|
|
184
|
+
- `spot_public_get_aggtrades(request)`
|
|
185
|
+
- `spot_public_get_klines(request)`
|
|
186
|
+
- `spot_public_get_avgprice(request)`
|
|
187
|
+
- `spot_public_get_ticker_24hr(request)`
|
|
188
|
+
- `spot_public_get_ticker_price(request)`
|
|
189
|
+
- `spot_public_get_ticker_bookticker(request)`
|
|
190
|
+
- `spot_public_get_etf_info(request)`
|
|
191
|
+
- `spot_private_get_order(request)`
|
|
192
|
+
- `spot_private_get_openorders(request)`
|
|
193
|
+
- `spot_private_get_allorders(request)`
|
|
194
|
+
- `spot_private_get_account(request)`
|
|
195
|
+
- `spot_private_get_mytrades(request)`
|
|
196
|
+
- `spot_private_get_tradefee(request)`
|
|
197
|
+
- `spot_private_get_sub_account_list(request)`
|
|
198
|
+
- `spot_private_get_sub_account_apikey(request)`
|
|
199
|
+
- `spot_private_get_capital_config_getall(request)`
|
|
200
|
+
- `spot_private_get_capital_deposit_hisrec(request)`
|
|
201
|
+
- `spot_private_get_capital_withdraw_history(request)`
|
|
202
|
+
- `spot_private_get_capital_withdraw_address(request)`
|
|
203
|
+
- `spot_private_get_capital_deposit_address(request)`
|
|
204
|
+
- `spot_private_get_capital_transfer(request)`
|
|
205
|
+
- `spot_private_get_capital_transfer_tranid(request)`
|
|
206
|
+
- `spot_private_get_capital_transfer_internal(request)`
|
|
207
|
+
- `spot_private_get_capital_sub_account_universaltransfer(request)`
|
|
208
|
+
- `spot_private_get_capital_convert(request)`
|
|
209
|
+
- `spot_private_get_capital_convert_list(request)`
|
|
210
|
+
- `spot_private_get_margin_loan(request)`
|
|
211
|
+
- `spot_private_get_margin_allorders(request)`
|
|
212
|
+
- `spot_private_get_margin_mytrades(request)`
|
|
213
|
+
- `spot_private_get_margin_openorders(request)`
|
|
214
|
+
- `spot_private_get_margin_maxtransferable(request)`
|
|
215
|
+
- `spot_private_get_margin_priceindex(request)`
|
|
216
|
+
- `spot_private_get_margin_order(request)`
|
|
217
|
+
- `spot_private_get_margin_isolated_account(request)`
|
|
218
|
+
- `spot_private_get_margin_maxborrowable(request)`
|
|
219
|
+
- `spot_private_get_margin_repay(request)`
|
|
220
|
+
- `spot_private_get_margin_isolated_pair(request)`
|
|
221
|
+
- `spot_private_get_margin_forceliquidationrec(request)`
|
|
222
|
+
- `spot_private_get_margin_isolatedmargindata(request)`
|
|
223
|
+
- `spot_private_get_margin_isolatedmargintier(request)`
|
|
224
|
+
- `spot_private_get_rebate_taxquery(request)`
|
|
225
|
+
- `spot_private_get_rebate_detail(request)`
|
|
226
|
+
- `spot_private_get_rebate_detail_kickback(request)`
|
|
227
|
+
- `spot_private_get_rebate_refercode(request)`
|
|
228
|
+
- `spot_private_get_rebate_affiliate_commission(request)`
|
|
229
|
+
- `spot_private_get_rebate_affiliate_withdraw(request)`
|
|
230
|
+
- `spot_private_get_rebate_affiliate_commission_detail(request)`
|
|
231
|
+
- `spot_private_get_mxdeduct_enable(request)`
|
|
232
|
+
- `spot_private_get_userdatastream(request)`
|
|
233
|
+
- `spot_private_get_selfsymbols(request)`
|
|
234
|
+
- `spot_private_post_order(request)`
|
|
235
|
+
- `spot_private_post_order_test(request)`
|
|
236
|
+
- `spot_private_post_sub_account_virtualsubaccount(request)`
|
|
237
|
+
- `spot_private_post_sub_account_apikey(request)`
|
|
238
|
+
- `spot_private_post_sub_account_futures(request)`
|
|
239
|
+
- `spot_private_post_sub_account_margin(request)`
|
|
240
|
+
- `spot_private_post_batchorders(request)`
|
|
241
|
+
- `spot_private_post_capital_withdraw_apply(request)`
|
|
242
|
+
- `spot_private_post_capital_withdraw(request)`
|
|
243
|
+
- `spot_private_post_capital_transfer(request)`
|
|
244
|
+
- `spot_private_post_capital_transfer_internal(request)`
|
|
245
|
+
- `spot_private_post_capital_deposit_address(request)`
|
|
246
|
+
- `spot_private_post_capital_sub_account_universaltransfer(request)`
|
|
247
|
+
- `spot_private_post_capital_convert(request)`
|
|
248
|
+
- `spot_private_post_mxdeduct_enable(request)`
|
|
249
|
+
- `spot_private_post_userdatastream(request)`
|
|
250
|
+
- `spot_private_put_userdatastream(request)`
|
|
251
|
+
- `spot_private_delete_order(request)`
|
|
252
|
+
- `spot_private_delete_openorders(request)`
|
|
253
|
+
- `spot_private_delete_sub_account_apikey(request)`
|
|
254
|
+
- `spot_private_delete_margin_order(request)`
|
|
255
|
+
- `spot_private_delete_margin_openorders(request)`
|
|
256
|
+
- `spot_private_delete_userdatastream(request)`
|
|
257
|
+
- `spot_private_delete_capital_withdraw(request)`
|
|
258
|
+
- `contract_public_get_ping(request)`
|
|
259
|
+
- `contract_public_get_detail(request)`
|
|
260
|
+
- `contract_public_get_support_currencies(request)`
|
|
261
|
+
- `contract_public_get_depth_symbol(request)`
|
|
262
|
+
- `contract_public_get_depth_commits_symbol_limit(request)`
|
|
263
|
+
- `contract_public_get_index_price_symbol(request)`
|
|
264
|
+
- `contract_public_get_fair_price_symbol(request)`
|
|
265
|
+
- `contract_public_get_funding_rate_symbol(request)`
|
|
266
|
+
- `contract_public_get_kline_symbol(request)`
|
|
267
|
+
- `contract_public_get_kline_index_price_symbol(request)`
|
|
268
|
+
- `contract_public_get_kline_fair_price_symbol(request)`
|
|
269
|
+
- `contract_public_get_deals_symbol(request)`
|
|
270
|
+
- `contract_public_get_ticker(request)`
|
|
271
|
+
- `contract_public_get_risk_reverse(request)`
|
|
272
|
+
- `contract_public_get_risk_reverse_history(request)`
|
|
273
|
+
- `contract_public_get_funding_rate_history(request)`
|
|
274
|
+
- `contract_private_get_account_assets(request)`
|
|
275
|
+
- `contract_private_get_account_asset_currency(request)`
|
|
276
|
+
- `contract_private_get_account_transfer_record(request)`
|
|
277
|
+
- `contract_private_get_position_list_history_positions(request)`
|
|
278
|
+
- `contract_private_get_position_open_positions(request)`
|
|
279
|
+
- `contract_private_get_position_funding_records(request)`
|
|
280
|
+
- `contract_private_get_position_position_mode(request)`
|
|
281
|
+
- `contract_private_get_order_list_open_orders_symbol(request)`
|
|
282
|
+
- `contract_private_get_order_list_history_orders(request)`
|
|
283
|
+
- `contract_private_get_order_external_symbol_external_oid(request)`
|
|
284
|
+
- `contract_private_get_order_get_order_id(request)`
|
|
285
|
+
- `contract_private_get_order_batch_query(request)`
|
|
286
|
+
- `contract_private_get_order_deal_details_order_id(request)`
|
|
287
|
+
- `contract_private_get_order_list_order_deals(request)`
|
|
288
|
+
- `contract_private_get_planorder_list_orders(request)`
|
|
289
|
+
- `contract_private_get_stoporder_list_orders(request)`
|
|
290
|
+
- `contract_private_get_stoporder_order_details_stop_order_id(request)`
|
|
291
|
+
- `contract_private_get_account_risk_limit(request)`
|
|
292
|
+
- `contract_private_get_account_tiered_fee_rate(request)`
|
|
293
|
+
- `contract_private_get_position_leverage(request)`
|
|
294
|
+
- `contract_private_post_position_change_margin(request)`
|
|
295
|
+
- `contract_private_post_position_change_leverage(request)`
|
|
296
|
+
- `contract_private_post_position_change_position_mode(request)`
|
|
297
|
+
- `contract_private_post_order_submit(request)`
|
|
298
|
+
- `contract_private_post_order_submit_batch(request)`
|
|
299
|
+
- `contract_private_post_order_cancel(request)`
|
|
300
|
+
- `contract_private_post_order_cancel_with_external(request)`
|
|
301
|
+
- `contract_private_post_order_cancel_all(request)`
|
|
302
|
+
- `contract_private_post_account_change_risk_level(request)`
|
|
303
|
+
- `contract_private_post_planorder_place(request)`
|
|
304
|
+
- `contract_private_post_planorder_cancel(request)`
|
|
305
|
+
- `contract_private_post_planorder_cancel_all(request)`
|
|
306
|
+
- `contract_private_post_stoporder_cancel(request)`
|
|
307
|
+
- `contract_private_post_stoporder_cancel_all(request)`
|
|
308
|
+
- `contract_private_post_stoporder_change_price(request)`
|
|
309
|
+
- `contract_private_post_stoporder_change_plan_price(request)`
|
|
310
|
+
- `spot2_public_get_market_symbols(request)`
|
|
311
|
+
- `spot2_public_get_market_coin_list(request)`
|
|
312
|
+
- `spot2_public_get_common_timestamp(request)`
|
|
313
|
+
- `spot2_public_get_common_ping(request)`
|
|
314
|
+
- `spot2_public_get_market_ticker(request)`
|
|
315
|
+
- `spot2_public_get_market_depth(request)`
|
|
316
|
+
- `spot2_public_get_market_deals(request)`
|
|
317
|
+
- `spot2_public_get_market_kline(request)`
|
|
318
|
+
- `spot2_public_get_market_api_default_symbols(request)`
|
|
319
|
+
- `spot2_private_get_account_info(request)`
|
|
320
|
+
- `spot2_private_get_order_open_orders(request)`
|
|
321
|
+
- `spot2_private_get_order_list(request)`
|
|
322
|
+
- `spot2_private_get_order_query(request)`
|
|
323
|
+
- `spot2_private_get_order_deals(request)`
|
|
324
|
+
- `spot2_private_get_order_deal_detail(request)`
|
|
325
|
+
- `spot2_private_get_asset_deposit_address_list(request)`
|
|
326
|
+
- `spot2_private_get_asset_deposit_list(request)`
|
|
327
|
+
- `spot2_private_get_asset_address_list(request)`
|
|
328
|
+
- `spot2_private_get_asset_withdraw_list(request)`
|
|
329
|
+
- `spot2_private_get_asset_internal_transfer_record(request)`
|
|
330
|
+
- `spot2_private_get_account_balance(request)`
|
|
331
|
+
- `spot2_private_get_asset_internal_transfer_info(request)`
|
|
332
|
+
- `spot2_private_get_market_api_symbols(request)`
|
|
333
|
+
- `spot2_private_post_order_place(request)`
|
|
334
|
+
- `spot2_private_post_order_place_batch(request)`
|
|
335
|
+
- `spot2_private_post_order_advanced_place_batch(request)`
|
|
336
|
+
- `spot2_private_post_asset_withdraw(request)`
|
|
337
|
+
- `spot2_private_post_asset_internal_transfer(request)`
|
|
338
|
+
- `spot2_private_delete_order_cancel(request)`
|
|
339
|
+
- `spot2_private_delete_order_cancel_by_symbol(request)`
|
|
340
|
+
- `spot2_private_delete_asset_withdraw(request)`
|
|
341
|
+
- `broker_private_get_sub_account_universaltransfer(request)`
|
|
342
|
+
- `broker_private_get_sub_account_list(request)`
|
|
343
|
+
- `broker_private_get_sub_account_apikey(request)`
|
|
344
|
+
- `broker_private_get_capital_deposit_subaddress(request)`
|
|
345
|
+
- `broker_private_get_capital_deposit_subhisrec(request)`
|
|
346
|
+
- `broker_private_get_capital_deposit_subhisrec_getall(request)`
|
|
347
|
+
- `broker_private_post_sub_account_virtualsubaccount(request)`
|
|
348
|
+
- `broker_private_post_sub_account_apikey(request)`
|
|
349
|
+
- `broker_private_post_capital_deposit_subaddress(request)`
|
|
350
|
+
- `broker_private_post_capital_withdraw_apply(request)`
|
|
351
|
+
- `broker_private_post_sub_account_universaltransfer(request)`
|
|
352
|
+
- `broker_private_post_sub_account_futures(request)`
|
|
353
|
+
- `broker_private_delete_sub_account_apikey(request)`
|
|
354
|
+
|
|
355
|
+
### WS Unified
|
|
356
|
+
|
|
357
|
+
- `describe(self)`
|
|
358
|
+
- `watch_ticker(self, symbol: str, params={})`
|
|
359
|
+
- `watch_tickers(self, symbols: Strings = None, params={})`
|
|
360
|
+
- `watch_bids_asks(self, symbols: Strings = None, params={})`
|
|
361
|
+
- `watch_spot_public(self, channel, messageHash, params={})`
|
|
362
|
+
- `watch_spot_private(self, channel, messageHash, params={})`
|
|
363
|
+
- `watch_swap_public(self, channel, messageHash, requestParams, params={})`
|
|
364
|
+
- `watch_swap_private(self, messageHash, params={})`
|
|
365
|
+
- `watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
|
|
366
|
+
- `watch_order_book(self, symbol: str, limit: Int = None, params={})`
|
|
367
|
+
- `get_cache_index(self, orderbook, cache)`
|
|
368
|
+
- `watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
|
|
369
|
+
- `watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
370
|
+
- `watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
|
|
371
|
+
- `watch_balance(self, params={})`
|
|
372
|
+
- `authenticate(self, subscriptionHash, params={})`
|
|
373
|
+
- `keep_alive_listen_key(self, listenKey, params={})`
|
|
374
|
+
|
|
375
|
+
## Contribution
|
|
376
|
+
- Give us a star :star:
|
|
377
|
+
- Fork and Clone! Awesome
|
|
378
|
+
- Select existing issues or create a new issue.
|
|
@@ -283,6 +283,6 @@ mexc/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
|
|
|
283
283
|
mexc/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
|
284
284
|
mexc/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
285
285
|
mexc/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
|
286
|
-
mexc_exchange_api-0.0.
|
|
287
|
-
mexc_exchange_api-0.0.
|
|
288
|
-
mexc_exchange_api-0.0.
|
|
286
|
+
mexc_exchange_api-0.0.17.dist-info/METADATA,sha256=5V_SUuwZiZ_QpWAfYjpMXsjqLrIxe4rOJi_1oRc2l7w,17151
|
|
287
|
+
mexc_exchange_api-0.0.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
288
|
+
mexc_exchange_api-0.0.17.dist-info/RECORD,,
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mexc-exchange-api
|
|
3
|
-
Version: 0.0.16
|
|
4
|
-
Summary: mexc 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
|
-
# mexc-python
|
|
21
|
-
Python SDK (sync and async) for Mexc cryptocurrency exchange with Rest and WS capabilities.
|
|
22
|
-
|
|
23
|
-
You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/mexc)
|
|
24
|
-
You can check Mexc'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 mexc-exchange-api
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Usage
|
|
35
|
-
|
|
36
|
-
### Sync
|
|
37
|
-
|
|
38
|
-
```Python
|
|
39
|
-
from mexc import MexcSync
|
|
40
|
-
|
|
41
|
-
def main():
|
|
42
|
-
instance = MexcSync({})
|
|
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 mexc import MexcAsync
|
|
55
|
-
|
|
56
|
-
async def main():
|
|
57
|
-
instance = MexcAsync({})
|
|
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 mexc import MexcWs
|
|
71
|
-
|
|
72
|
-
async def main():
|
|
73
|
-
instance = MexcWs({})
|
|
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
|
-
|
|
File without changes
|