|
1 | | -# gate_client.FuturesApi |
| 1 | +# gate_api.FuturesApi |
2 | 2 |
|
3 | 3 | All URIs are relative to *https://fx-api.gateio.io/api/v4* |
4 | 4 |
|
@@ -33,16 +33,16 @@ Cancel a single order |
33 | 33 |
|
34 | 34 | ```python |
35 | 35 | from __future__ import print_function |
36 | | -import gate_client |
37 | | -from gate_client.rest import ApiException |
| 36 | +import gate_api |
| 37 | +from gate_api.rest import ApiException |
38 | 38 |
|
39 | 39 | # Configure API key authorization: api_key |
40 | | -configuration = gate_client.Configuration() |
| 40 | +configuration = gate_api.Configuration() |
41 | 41 | configuration.key = "YOUR_API_KEY" |
42 | 42 | configuration.secret = "YOUR_API_SECRET" |
43 | 43 |
|
44 | 44 | # create an instance of the API class |
45 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 45 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
46 | 46 | order_id = 'order_id_example' # str | order id |
47 | 47 |
|
48 | 48 | try: |
@@ -78,16 +78,16 @@ Cancel all `open` orders matched |
78 | 78 |
|
79 | 79 | ```python |
80 | 80 | from __future__ import print_function |
81 | | -import gate_client |
82 | | -from gate_client.rest import ApiException |
| 81 | +import gate_api |
| 82 | +from gate_api.rest import ApiException |
83 | 83 |
|
84 | 84 | # Configure API key authorization: api_key |
85 | | -configuration = gate_client.Configuration() |
| 85 | +configuration = gate_api.Configuration() |
86 | 86 | configuration.key = "YOUR_API_KEY" |
87 | 87 | configuration.secret = "YOUR_API_SECRET" |
88 | 88 |
|
89 | 89 | # create an instance of the API class |
90 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 90 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
91 | 91 | contract = 'contract_example' # str | futures contract |
92 | 92 | side = 'side_example' # str | All bids or asks. Both included in not specfied (optional) |
93 | 93 |
|
@@ -125,16 +125,16 @@ Create a futures order |
125 | 125 |
|
126 | 126 | ```python |
127 | 127 | from __future__ import print_function |
128 | | -import gate_client |
129 | | -from gate_client.rest import ApiException |
| 128 | +import gate_api |
| 129 | +from gate_api.rest import ApiException |
130 | 130 |
|
131 | 131 | # Configure API key authorization: api_key |
132 | | -configuration = gate_client.Configuration() |
| 132 | +configuration = gate_api.Configuration() |
133 | 133 | configuration.key = "YOUR_API_KEY" |
134 | 134 | configuration.secret = "YOUR_API_SECRET" |
135 | 135 |
|
136 | 136 | # create an instance of the API class |
137 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 137 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
138 | 138 | futures_order = {"$ref":"examples/mercury/FuturesOrder.json"} # FuturesOrder | (optional) |
139 | 139 |
|
140 | 140 | try: |
@@ -171,16 +171,16 @@ List personal trading history |
171 | 171 |
|
172 | 172 | ```python |
173 | 173 | from __future__ import print_function |
174 | | -import gate_client |
175 | | -from gate_client.rest import ApiException |
| 174 | +import gate_api |
| 175 | +from gate_api.rest import ApiException |
176 | 176 |
|
177 | 177 | # Configure API key authorization: api_key |
178 | | -configuration = gate_client.Configuration() |
| 178 | +configuration = gate_api.Configuration() |
179 | 179 | configuration.key = "YOUR_API_KEY" |
180 | 180 | configuration.secret = "YOUR_API_SECRET" |
181 | 181 |
|
182 | 182 | # create an instance of the API class |
183 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 183 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
184 | 184 | contract = 'contract_example' # str | futures contract. If specified, return only data related to the contract (optional) |
185 | 185 | limit = 100 # int | maximum number of data returned in one request (optional) (default to 100) |
186 | 186 | last_id = 'last_id_example' # str | specify list staring record. Use the `id` in every last record of one list-query request to achieve consecutive list query (optional) |
@@ -221,16 +221,16 @@ Get a single order |
221 | 221 |
|
222 | 222 | ```python |
223 | 223 | from __future__ import print_function |
224 | | -import gate_client |
225 | | -from gate_client.rest import ApiException |
| 224 | +import gate_api |
| 225 | +from gate_api.rest import ApiException |
226 | 226 |
|
227 | 227 | # Configure API key authorization: api_key |
228 | | -configuration = gate_client.Configuration() |
| 228 | +configuration = gate_api.Configuration() |
229 | 229 | configuration.key = "YOUR_API_KEY" |
230 | 230 | configuration.secret = "YOUR_API_SECRET" |
231 | 231 |
|
232 | 232 | # create an instance of the API class |
233 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 233 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
234 | 234 | order_id = 'order_id_example' # str | order id |
235 | 235 |
|
236 | 236 | try: |
@@ -267,16 +267,16 @@ Query futures account |
267 | 267 |
|
268 | 268 | ```python |
269 | 269 | from __future__ import print_function |
270 | | -import gate_client |
271 | | -from gate_client.rest import ApiException |
| 270 | +import gate_api |
| 271 | +from gate_api.rest import ApiException |
272 | 272 |
|
273 | 273 | # Configure API key authorization: api_key |
274 | | -configuration = gate_client.Configuration() |
| 274 | +configuration = gate_api.Configuration() |
275 | 275 | configuration.key = "YOUR_API_KEY" |
276 | 276 | configuration.secret = "YOUR_API_SECRET" |
277 | 277 |
|
278 | 278 | # create an instance of the API class |
279 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 279 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
280 | 280 |
|
281 | 281 | try: |
282 | 282 | # Query futures account |
@@ -310,11 +310,11 @@ Return specified contract candlesticks. If prefix `contract` with `mark_`, the c |
310 | 310 | ### Example |
311 | 311 | ```python |
312 | 312 | from __future__ import print_function |
313 | | -import gate_client |
314 | | -from gate_client.rest import ApiException |
| 313 | +import gate_api |
| 314 | +from gate_api.rest import ApiException |
315 | 315 |
|
316 | 316 | # create an instance of the API class |
317 | | -api_instance = gate_client.FuturesApi() |
| 317 | +api_instance = gate_api.FuturesApi() |
318 | 318 | contract = 'contract_example' # str | futures contract |
319 | 319 | _from = 1545696000 # float | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to `to - 100 * interval` if not specified (optional) |
320 | 320 | to = 1545955200 # float | End time of candlesticsk, formatted in Unix timestamp in seconds. Default to current time (optional) |
@@ -358,11 +358,11 @@ List all futures contracts |
358 | 358 | ### Example |
359 | 359 | ```python |
360 | 360 | from __future__ import print_function |
361 | | -import gate_client |
362 | | -from gate_client.rest import ApiException |
| 361 | +import gate_api |
| 362 | +from gate_api.rest import ApiException |
363 | 363 |
|
364 | 364 | # create an instance of the API class |
365 | | -api_instance = gate_client.FuturesApi() |
| 365 | +api_instance = gate_api.FuturesApi() |
366 | 366 |
|
367 | 367 | try: |
368 | 368 | # List all futures contracts |
@@ -394,11 +394,11 @@ Funding rate history |
394 | 394 | ### Example |
395 | 395 | ```python |
396 | 396 | from __future__ import print_function |
397 | | -import gate_client |
398 | | -from gate_client.rest import ApiException |
| 397 | +import gate_api |
| 398 | +from gate_api.rest import ApiException |
399 | 399 |
|
400 | 400 | # create an instance of the API class |
401 | | -api_instance = gate_client.FuturesApi() |
| 401 | +api_instance = gate_api.FuturesApi() |
402 | 402 | contract = 'contract_example' # str | futures contract |
403 | 403 | limit = 100 # int | maximum number of data returned in one request (optional) (default to 100) |
404 | 404 |
|
@@ -436,11 +436,11 @@ Futures insurance balance history |
436 | 436 | ### Example |
437 | 437 | ```python |
438 | 438 | from __future__ import print_function |
439 | | -import gate_client |
440 | | -from gate_client.rest import ApiException |
| 439 | +import gate_api |
| 440 | +from gate_api.rest import ApiException |
441 | 441 |
|
442 | 442 | # create an instance of the API class |
443 | | -api_instance = gate_client.FuturesApi() |
| 443 | +api_instance = gate_api.FuturesApi() |
444 | 444 | limit = 100 # int | maximum number of data returned in one request (optional) (default to 100) |
445 | 445 |
|
446 | 446 | try: |
@@ -478,11 +478,11 @@ bids will be sorted by price from high to low, while asks sorted reversely |
478 | 478 | ### Example |
479 | 479 | ```python |
480 | 480 | from __future__ import print_function |
481 | | -import gate_client |
482 | | -from gate_client.rest import ApiException |
| 481 | +import gate_api |
| 482 | +from gate_api.rest import ApiException |
483 | 483 |
|
484 | 484 | # create an instance of the API class |
485 | | -api_instance = gate_client.FuturesApi() |
| 485 | +api_instance = gate_api.FuturesApi() |
486 | 486 | contract = 'contract_example' # str | futures contract |
487 | 487 | interval = '0' # str | order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') |
488 | 488 | limit = 10 # int | maximum number of order depth data in asks or bids (optional) (default to 10) |
@@ -522,11 +522,11 @@ List futures tickers |
522 | 522 | ### Example |
523 | 523 | ```python |
524 | 524 | from __future__ import print_function |
525 | | -import gate_client |
526 | | -from gate_client.rest import ApiException |
| 525 | +import gate_api |
| 526 | +from gate_api.rest import ApiException |
527 | 527 |
|
528 | 528 | # create an instance of the API class |
529 | | -api_instance = gate_client.FuturesApi() |
| 529 | +api_instance = gate_api.FuturesApi() |
530 | 530 | contract = 'contract_example' # str | futures contract. If specified, return only data related to the contract (optional) |
531 | 531 |
|
532 | 532 | try: |
@@ -562,11 +562,11 @@ Futures trading history |
562 | 562 | ### Example |
563 | 563 | ```python |
564 | 564 | from __future__ import print_function |
565 | | -import gate_client |
566 | | -from gate_client.rest import ApiException |
| 565 | +import gate_api |
| 566 | +from gate_api.rest import ApiException |
567 | 567 |
|
568 | 568 | # create an instance of the API class |
569 | | -api_instance = gate_client.FuturesApi() |
| 569 | +api_instance = gate_api.FuturesApi() |
570 | 570 | contract = 'contract_example' # str | futures contract |
571 | 571 | limit = 100 # int | maximum number of data returned in one request (optional) (default to 100) |
572 | 572 | last_id = 'last_id_example' # str | specify list staring record. Use the `id` in every last record of one list-query request to achieve consecutive list query (optional) |
@@ -607,16 +607,16 @@ List futures orders |
607 | 607 |
|
608 | 608 | ```python |
609 | 609 | from __future__ import print_function |
610 | | -import gate_client |
611 | | -from gate_client.rest import ApiException |
| 610 | +import gate_api |
| 611 | +from gate_api.rest import ApiException |
612 | 612 |
|
613 | 613 | # Configure API key authorization: api_key |
614 | | -configuration = gate_client.Configuration() |
| 614 | +configuration = gate_api.Configuration() |
615 | 615 | configuration.key = "YOUR_API_KEY" |
616 | 616 | configuration.secret = "YOUR_API_SECRET" |
617 | 617 |
|
618 | 618 | # create an instance of the API class |
619 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 619 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
620 | 620 | contract = 'contract_example' # str | futures contract |
621 | 621 | status = 'status_example' # str | order status |
622 | 622 | limit = 100 # int | maximum number of data returned in one request (optional) (default to 100) |
@@ -659,16 +659,16 @@ List all positions |
659 | 659 |
|
660 | 660 | ```python |
661 | 661 | from __future__ import print_function |
662 | | -import gate_client |
663 | | -from gate_client.rest import ApiException |
| 662 | +import gate_api |
| 663 | +from gate_api.rest import ApiException |
664 | 664 |
|
665 | 665 | # Configure API key authorization: api_key |
666 | | -configuration = gate_client.Configuration() |
| 666 | +configuration = gate_api.Configuration() |
667 | 667 | configuration.key = "YOUR_API_KEY" |
668 | 668 | configuration.secret = "YOUR_API_SECRET" |
669 | 669 |
|
670 | 670 | # create an instance of the API class |
671 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 671 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
672 | 672 |
|
673 | 673 | try: |
674 | 674 | # List all positions |
@@ -701,16 +701,16 @@ Update position leverage |
701 | 701 |
|
702 | 702 | ```python |
703 | 703 | from __future__ import print_function |
704 | | -import gate_client |
705 | | -from gate_client.rest import ApiException |
| 704 | +import gate_api |
| 705 | +from gate_api.rest import ApiException |
706 | 706 |
|
707 | 707 | # Configure API key authorization: api_key |
708 | | -configuration = gate_client.Configuration() |
| 708 | +configuration = gate_api.Configuration() |
709 | 709 | configuration.key = "YOUR_API_KEY" |
710 | 710 | configuration.secret = "YOUR_API_SECRET" |
711 | 711 |
|
712 | 712 | # create an instance of the API class |
713 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 713 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
714 | 714 | contract = 'contract_example' # str | futures contract |
715 | 715 | leverage = 'leverage_example' # str | new leverage of position |
716 | 716 |
|
@@ -749,16 +749,16 @@ Update position margin |
749 | 749 |
|
750 | 750 | ```python |
751 | 751 | from __future__ import print_function |
752 | | -import gate_client |
753 | | -from gate_client.rest import ApiException |
| 752 | +import gate_api |
| 753 | +from gate_api.rest import ApiException |
754 | 754 |
|
755 | 755 | # Configure API key authorization: api_key |
756 | | -configuration = gate_client.Configuration() |
| 756 | +configuration = gate_api.Configuration() |
757 | 757 | configuration.key = "YOUR_API_KEY" |
758 | 758 | configuration.secret = "YOUR_API_SECRET" |
759 | 759 |
|
760 | 760 | # create an instance of the API class |
761 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 761 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
762 | 762 | contract = 'contract_example' # str | futures contract |
763 | 763 | change = 'change_example' # str | margin change. Use positive number to increase margin, negative number otherwise. |
764 | 764 |
|
@@ -797,16 +797,16 @@ Update poisition risk limit |
797 | 797 |
|
798 | 798 | ```python |
799 | 799 | from __future__ import print_function |
800 | | -import gate_client |
801 | | -from gate_client.rest import ApiException |
| 800 | +import gate_api |
| 801 | +from gate_api.rest import ApiException |
802 | 802 |
|
803 | 803 | # Configure API key authorization: api_key |
804 | | -configuration = gate_client.Configuration() |
| 804 | +configuration = gate_api.Configuration() |
805 | 805 | configuration.key = "YOUR_API_KEY" |
806 | 806 | configuration.secret = "YOUR_API_SECRET" |
807 | 807 |
|
808 | 808 | # create an instance of the API class |
809 | | -api_instance = gate_client.FuturesApi(gate_client.ApiClient(configuration)) |
| 809 | +api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration)) |
810 | 810 | contract = 'contract_example' # str | futures contract |
811 | 811 | risk_limit = 'risk_limit_example' # str | new risk limit of position |
812 | 812 |
|
|
0 commit comments