@bitget-ai/bitget-agent-skill 1.2.0

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.
@@ -0,0 +1,1258 @@
1
+ # bgc Command Reference
2
+
3
+ Auto-generated from @bitget-ai/bitget-agent-sdk tool definitions.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ bgc <module> <tool_name> [--param value ...]
9
+ ```
10
+
11
+ ## Module: spot
12
+
13
+ ### `spot_get_ticker`
14
+
15
+ Get real-time ticker data for spot trading pair(s). Public endpoint. Rate limit: 20 req/s per IP.
16
+
17
+ **Write operation:** No
18
+
19
+ **Parameters:**
20
+
21
+ | Name | Type | Required | Description |
22
+ |------|------|----------|-------------|
23
+ | `symbol` | string | No | Trading pair symbol, e.g. BTCUSDT. Omit for all tickers. |
24
+
25
+ **Example:**
26
+ ```bash
27
+ bgc spot spot_get_ticker --symbol <value>
28
+ ```
29
+
30
+ ### `spot_get_depth`
31
+
32
+ Get orderbook depth for a spot trading pair. Public endpoint. Rate limit: 20 req/s per IP.
33
+
34
+ **Write operation:** No
35
+
36
+ **Parameters:**
37
+
38
+ | Name | Type | Required | Description |
39
+ |------|------|----------|-------------|
40
+ | `symbol` | string | Yes | Trading pair symbol, e.g. BTCUSDT |
41
+ | `type` | string | No | Depth merge level. step0 means raw orderbook. |
42
+ | `limit` | number | No | Depth levels, default 150, max 150. |
43
+
44
+ **Example:**
45
+ ```bash
46
+ bgc spot spot_get_depth --symbol <value> --type <value>
47
+ ```
48
+
49
+ ### `spot_get_candles`
50
+
51
+ Get K-line data for spot trading pair. Public endpoint. Rate limit: 20 req/s per IP.
52
+
53
+ **Write operation:** No
54
+
55
+ **Parameters:**
56
+
57
+ | Name | Type | Required | Description |
58
+ |------|------|----------|-------------|
59
+ | `symbol` | string | Yes | Trading pair symbol, e.g. BTCUSDT |
60
+ | `granularity` | string | Yes | Candlestick period. |
61
+ | `startTime` | string | No | Start time in milliseconds. |
62
+ | `endTime` | string | No | End time in milliseconds. |
63
+ | `limit` | number | No | Result size, default 100, max 1000. |
64
+
65
+ **Example:**
66
+ ```bash
67
+ bgc spot spot_get_candles --symbol <value> --granularity <value>
68
+ ```
69
+
70
+ ### `spot_get_trades`
71
+
72
+ Get recent or historical trade records for spot symbol. Public endpoint. Rate limit: 10 req/s per IP.
73
+
74
+ **Write operation:** No
75
+
76
+ **Parameters:**
77
+
78
+ | Name | Type | Required | Description |
79
+ |------|------|----------|-------------|
80
+ | `symbol` | string | Yes | Trading pair symbol. |
81
+ | `limit` | number | No | Result size, default 100, max 500. |
82
+ | `startTime` | string | No | Start time in milliseconds. |
83
+ | `endTime` | string | No | End time in milliseconds. |
84
+
85
+ **Example:**
86
+ ```bash
87
+ bgc spot spot_get_trades --symbol <value> --limit <value>
88
+ ```
89
+
90
+ ### `spot_get_symbols`
91
+
92
+ Get spot symbol info or coin chain info. Public endpoint. Rate limit: 20 req/s per IP.
93
+
94
+ **Write operation:** No
95
+
96
+ **Parameters:**
97
+
98
+ | Name | Type | Required | Description |
99
+ |------|------|----------|-------------|
100
+ | `type` | string | No | symbols(default) or coins. |
101
+ | `symbol` | string | No | Specific symbol filter. |
102
+ | `coin` | string | No | Specific coin filter. |
103
+
104
+ **Example:**
105
+ ```bash
106
+ bgc spot spot_get_symbols --type <value> --symbol <value>
107
+ ```
108
+
109
+ ### `spot_place_order`
110
+
111
+ Place one or more spot orders. [CAUTION] Executes real trades. Private endpoint. Rate limit: 10 req/s per UID.
112
+
113
+ **Write operation:** Yes — requires confirmation
114
+
115
+ **Parameters:**
116
+
117
+ | Name | Type | Required | Description |
118
+ |------|------|----------|-------------|
119
+ | `orders` | array | Yes | Array of order objects. Single order should still be passed as an array with one item. |
120
+
121
+ **Example:**
122
+ ```bash
123
+ bgc spot spot_place_order --orders <value>
124
+ ```
125
+
126
+ ### `spot_cancel_orders`
127
+
128
+ Cancel one or more spot orders by id, batch ids, or symbol-wide cancel. Private endpoint. Rate limit: 10 req/s per UID.
129
+
130
+ **Write operation:** Yes — requires confirmation
131
+
132
+ **Parameters:**
133
+
134
+ | Name | Type | Required | Description |
135
+ |------|------|----------|-------------|
136
+ | `symbol` | string | Yes | Trading pair symbol. |
137
+ | `orderId` | string | No | Single order id. |
138
+ | `orderIds` | array | No | Multiple order ids. Max 50. |
139
+ | `cancelAll` | boolean | No | If true, cancel all open orders for symbol. |
140
+
141
+ **Example:**
142
+ ```bash
143
+ bgc spot spot_cancel_orders --symbol <value> --orderId <value>
144
+ ```
145
+
146
+ ### `spot_modify_order`
147
+
148
+ Cancel and replace a spot order atomically. Private endpoint. Rate limit: 10 req/s per UID.
149
+
150
+ **Write operation:** Yes — requires confirmation
151
+
152
+ **Parameters:**
153
+
154
+ | Name | Type | Required | Description |
155
+ |------|------|----------|-------------|
156
+ | `symbol` | string | Yes | Trading pair symbol. |
157
+ | `orderId` | string | Yes | Original order id. |
158
+ | `newPrice` | string | No | New price for limit order. |
159
+ | `newSize` | string | No | New order size. |
160
+ | `newClientOid` | string | No | New client order id. |
161
+
162
+ **Example:**
163
+ ```bash
164
+ bgc spot spot_modify_order --symbol <value> --orderId <value>
165
+ ```
166
+
167
+ ### `spot_get_orders`
168
+
169
+ Query spot order detail, open orders, or history orders. Private endpoint. Rate limit: 10 req/s per UID.
170
+
171
+ **Write operation:** No
172
+
173
+ **Parameters:**
174
+
175
+ | Name | Type | Required | Description |
176
+ |------|------|----------|-------------|
177
+ | `orderId` | string | No | Specific order id. |
178
+ | `symbol` | string | No | Trading pair filter. |
179
+ | `status` | string | No | open(default) or history. |
180
+ | `startTime` | string | No | Start time in milliseconds. |
181
+ | `endTime` | string | No | End time in milliseconds. |
182
+ | `limit` | number | No | Result size, default 100. |
183
+ | `idLessThan` | string | No | Pagination cursor. |
184
+
185
+ **Example:**
186
+ ```bash
187
+ bgc spot spot_get_orders --orderId <value> --symbol <value>
188
+ ```
189
+
190
+ ### `spot_get_fills`
191
+
192
+ Get spot fills for order execution details. Private endpoint. Rate limit: 10 req/s per UID.
193
+
194
+ **Write operation:** No
195
+
196
+ **Parameters:**
197
+
198
+ | Name | Type | Required | Description |
199
+ |------|------|----------|-------------|
200
+ | `symbol` | string | No | Trading pair symbol. |
201
+ | `orderId` | string | No | Specific order id. |
202
+ | `startTime` | string | No | Start time in milliseconds. |
203
+ | `endTime` | string | No | End time in milliseconds. |
204
+ | `limit` | number | No | Result size, default 100. |
205
+
206
+ **Example:**
207
+ ```bash
208
+ bgc spot spot_get_fills --symbol <value> --orderId <value>
209
+ ```
210
+
211
+ ### `spot_place_plan_order`
212
+
213
+ Create or modify spot plan order (trigger order). Private endpoint. Rate limit: 10 req/s per UID.
214
+
215
+ **Write operation:** Yes — requires confirmation
216
+
217
+ **Parameters:**
218
+
219
+ | Name | Type | Required | Description |
220
+ |------|------|----------|-------------|
221
+ | `orderId` | string | No | When provided, modify existing plan order. |
222
+ | `symbol` | string | No | Trading pair symbol. |
223
+ | `side` | string | No | Order side. |
224
+ | `triggerPrice` | string | Yes | Trigger price. |
225
+ | `triggerType` | string | No | Trigger source. |
226
+ | `orderType` | string | No | Execution order type. |
227
+ | `price` | string | No | Execution price for limit orders. |
228
+ | `size` | string | No | Order quantity. |
229
+
230
+ **Example:**
231
+ ```bash
232
+ bgc spot spot_place_plan_order --orderId <value> --symbol <value>
233
+ ```
234
+
235
+ ### `spot_get_plan_orders`
236
+
237
+ Get current or historical spot plan orders. Private endpoint. Rate limit: 10 req/s per UID.
238
+
239
+ **Write operation:** No
240
+
241
+ **Parameters:**
242
+
243
+ | Name | Type | Required | Description |
244
+ |------|------|----------|-------------|
245
+ | `symbol` | string | No | Trading pair symbol. |
246
+ | `status` | string | No | current(default) or history. |
247
+ | `startTime` | string | No | Start time in milliseconds. |
248
+ | `endTime` | string | No | End time in milliseconds. |
249
+ | `limit` | number | No | Result size, default 100. |
250
+
251
+ **Example:**
252
+ ```bash
253
+ bgc spot spot_get_plan_orders --symbol <value> --status <value>
254
+ ```
255
+
256
+ ### `spot_cancel_plan_orders`
257
+
258
+ Cancel one or multiple spot plan orders. Private endpoint. Rate limit: 10 req/s per UID.
259
+
260
+ **Write operation:** Yes — requires confirmation
261
+
262
+ **Parameters:**
263
+
264
+ | Name | Type | Required | Description |
265
+ |------|------|----------|-------------|
266
+ | `orderId` | string | No | Single plan order id. |
267
+ | `symbol` | string | No | Cancel all plan orders for symbol. |
268
+
269
+ **Example:**
270
+ ```bash
271
+ bgc spot spot_cancel_plan_orders --orderId <value> --symbol <value>
272
+ ```
273
+
274
+ ## Module: futures
275
+
276
+ ### `futures_get_ticker`
277
+
278
+ Get futures ticker for one symbol or all symbols in product type. Public endpoint. Rate limit: 20 req/s per IP.
279
+
280
+ **Write operation:** No
281
+
282
+ **Parameters:**
283
+
284
+ | Name | Type | Required | Description |
285
+ |------|------|----------|-------------|
286
+ | `productType` | string | Yes | Futures product type. |
287
+ | `symbol` | string | No | Contract symbol, e.g. BTCUSDT. |
288
+
289
+ **Example:**
290
+ ```bash
291
+ bgc futures futures_get_ticker --productType <value> --symbol <value>
292
+ ```
293
+
294
+ ### `futures_get_depth`
295
+
296
+ Get futures orderbook depth with precision levels. Public endpoint. Rate limit: 20 req/s per IP.
297
+
298
+ **Write operation:** No
299
+
300
+ **Parameters:**
301
+
302
+ | Name | Type | Required | Description |
303
+ |------|------|----------|-------------|
304
+ | `productType` | string | Yes | |
305
+ | `symbol` | string | Yes | Contract symbol. |
306
+ | `limit` | number | No | Depth levels, default 100. |
307
+ | `precision` | string | No | Merge precision value. |
308
+
309
+ **Example:**
310
+ ```bash
311
+ bgc futures futures_get_depth --productType <value> --symbol <value>
312
+ ```
313
+
314
+ ### `futures_get_candles`
315
+
316
+ Get futures candles from trade/index/mark price sources. Public endpoint. Rate limit: 20 req/s per IP.
317
+
318
+ **Write operation:** No
319
+
320
+ **Parameters:**
321
+
322
+ | Name | Type | Required | Description |
323
+ |------|------|----------|-------------|
324
+ | `productType` | string | Yes | |
325
+ | `symbol` | string | Yes | |
326
+ | `granularity` | string | Yes | |
327
+ | `priceType` | string | No | trade(default), index, or mark. |
328
+ | `startTime` | string | No | |
329
+ | `endTime` | string | No | |
330
+ | `limit` | number | No | |
331
+
332
+ **Example:**
333
+ ```bash
334
+ bgc futures futures_get_candles --productType <value> --symbol <value>
335
+ ```
336
+
337
+ ### `futures_get_trades`
338
+
339
+ Get recent or historical futures trade records. Public endpoint. Rate limit: 10 req/s per IP.
340
+
341
+ **Write operation:** No
342
+
343
+ **Parameters:**
344
+
345
+ | Name | Type | Required | Description |
346
+ |------|------|----------|-------------|
347
+ | `productType` | string | Yes | |
348
+ | `symbol` | string | Yes | |
349
+ | `limit` | number | No | |
350
+ | `startTime` | string | No | |
351
+ | `endTime` | string | No | |
352
+
353
+ **Example:**
354
+ ```bash
355
+ bgc futures futures_get_trades --productType <value> --symbol <value>
356
+ ```
357
+
358
+ ### `futures_get_contracts`
359
+
360
+ Get futures contract configuration details. Public endpoint. Rate limit: 20 req/s per IP.
361
+
362
+ **Write operation:** No
363
+
364
+ **Parameters:**
365
+
366
+ | Name | Type | Required | Description |
367
+ |------|------|----------|-------------|
368
+ | `productType` | string | Yes | |
369
+ | `symbol` | string | No | Optional symbol filter. |
370
+
371
+ **Example:**
372
+ ```bash
373
+ bgc futures futures_get_contracts --productType <value> --symbol <value>
374
+ ```
375
+
376
+ ### `futures_get_funding_rate`
377
+
378
+ Get current or historical funding rates for a futures symbol. Public endpoint. Rate limit: 20 req/s per IP.
379
+
380
+ **Write operation:** No
381
+
382
+ **Parameters:**
383
+
384
+ | Name | Type | Required | Description |
385
+ |------|------|----------|-------------|
386
+ | `productType` | string | Yes | |
387
+ | `symbol` | string | Yes | |
388
+ | `history` | boolean | No | true for historical funding rates. |
389
+ | `pageSize` | number | No | Page size for history mode. |
390
+ | `pageNo` | number | No | Page number for history mode. |
391
+
392
+ **Example:**
393
+ ```bash
394
+ bgc futures futures_get_funding_rate --productType <value> --symbol <value>
395
+ ```
396
+
397
+ ### `futures_get_open_interest`
398
+
399
+ Get open interest for a futures contract. Public endpoint. Rate limit: 20 req/s per IP.
400
+
401
+ **Write operation:** No
402
+
403
+ **Parameters:**
404
+
405
+ | Name | Type | Required | Description |
406
+ |------|------|----------|-------------|
407
+ | `productType` | string | Yes | |
408
+ | `symbol` | string | Yes | |
409
+
410
+ **Example:**
411
+ ```bash
412
+ bgc futures futures_get_open_interest --productType <value> --symbol <value>
413
+ ```
414
+
415
+ ### `futures_place_order`
416
+
417
+ Place one or more futures orders with optional TP/SL. [CAUTION] Executes real trades. Private endpoint. Rate limit: 10 req/s per UID.
418
+
419
+ **Write operation:** Yes — requires confirmation
420
+
421
+ **Parameters:**
422
+
423
+ | Name | Type | Required | Description |
424
+ |------|------|----------|-------------|
425
+ | `orders` | array | Yes | Array of futures order objects. |
426
+
427
+ **Example:**
428
+ ```bash
429
+ bgc futures futures_place_order --orders <value>
430
+ ```
431
+
432
+ ### `futures_modify_order`
433
+
434
+ Modify a pending futures order: adjust TP/SL prices, size, or limit price. Modifying TP/SL only does NOT cancel the order. Modifying size/price cancels and recreates it. Pass '0' for newPresetStopSurplusPrice or newPresetStopLossPrice to delete that preset. [CAUTION] Affects live orders. Private endpoint. Rate limit: 10 req/s per UID.
435
+
436
+ **Write operation:** Yes — requires confirmation
437
+
438
+ **Parameters:**
439
+
440
+ | Name | Type | Required | Description |
441
+ |------|------|----------|-------------|
442
+ | `symbol` | string | Yes | Trading pair, e.g. BTCUSDT. |
443
+ | `productType` | string | Yes | Futures product type. |
444
+ | `marginCoin` | string | Yes | Margin asset, e.g. USDT. |
445
+ | `orderId` | string | No | Order ID. One of orderId or clientOid required. |
446
+ | `clientOid` | string | No | Custom order ID. orderId takes priority if both provided. |
447
+ | `newClientOid` | string | Yes | New custom order ID for the modified order. |
448
+ | `newSize` | string | No | New order quantity. Must be provided together with newPrice. |
449
+ | `newPrice` | string | No | New limit price. Must be provided together with newSize. |
450
+ | `newPresetStopSurplusPrice` | string | No | New take-profit trigger price. Pass '0' to delete. |
451
+ | `newPresetStopLossPrice` | string | No | New stop-loss trigger price. Pass '0' to delete. |
452
+
453
+ **Example:**
454
+ ```bash
455
+ bgc futures futures_modify_order --symbol <value> --productType <value>
456
+ ```
457
+
458
+ ### `futures_cancel_orders`
459
+
460
+ Cancel futures orders by order id, batch ids, or cancel-all mode. Private endpoint. Rate limit: 10 req/s per UID.
461
+
462
+ **Write operation:** Yes — requires confirmation
463
+
464
+ **Parameters:**
465
+
466
+ | Name | Type | Required | Description |
467
+ |------|------|----------|-------------|
468
+ | `productType` | string | Yes | |
469
+ | `symbol` | string | Yes | |
470
+ | `orderId` | string | No | |
471
+ | `orderIds` | array | No | |
472
+ | `cancelAll` | boolean | No | |
473
+ | `marginCoin` | string | No | |
474
+
475
+ **Example:**
476
+ ```bash
477
+ bgc futures futures_cancel_orders --productType <value> --symbol <value>
478
+ ```
479
+
480
+ ### `futures_get_orders`
481
+
482
+ Query futures orders by id, open status, or history. Private endpoint. Rate limit: 10 req/s per UID.
483
+
484
+ **Write operation:** No
485
+
486
+ **Parameters:**
487
+
488
+ | Name | Type | Required | Description |
489
+ |------|------|----------|-------------|
490
+ | `productType` | string | Yes | |
491
+ | `orderId` | string | No | |
492
+ | `symbol` | string | No | |
493
+ | `status` | string | No | |
494
+ | `startTime` | string | No | |
495
+ | `endTime` | string | No | |
496
+ | `limit` | number | No | |
497
+
498
+ **Example:**
499
+ ```bash
500
+ bgc futures futures_get_orders --productType <value> --orderId <value>
501
+ ```
502
+
503
+ ### `futures_get_fills`
504
+
505
+ Get futures fills and fill history records. Private endpoint. Rate limit: 10 req/s per UID.
506
+
507
+ **Write operation:** No
508
+
509
+ **Parameters:**
510
+
511
+ | Name | Type | Required | Description |
512
+ |------|------|----------|-------------|
513
+ | `productType` | string | Yes | |
514
+ | `symbol` | string | No | |
515
+ | `orderId` | string | No | |
516
+ | `startTime` | string | No | |
517
+ | `endTime` | string | No | |
518
+ | `limit` | number | No | |
519
+
520
+ **Example:**
521
+ ```bash
522
+ bgc futures futures_get_fills --productType <value> --symbol <value>
523
+ ```
524
+
525
+ ### `futures_get_positions`
526
+
527
+ Get current or historical futures positions. Private endpoint. Rate limit: 10 req/s per UID.
528
+
529
+ **Write operation:** No
530
+
531
+ **Parameters:**
532
+
533
+ | Name | Type | Required | Description |
534
+ |------|------|----------|-------------|
535
+ | `productType` | string | Yes | |
536
+ | `symbol` | string | No | |
537
+ | `marginCoin` | string | No | |
538
+ | `history` | boolean | No | |
539
+
540
+ **Example:**
541
+ ```bash
542
+ bgc futures futures_get_positions --productType <value> --symbol <value>
543
+ ```
544
+
545
+ ### `futures_set_leverage`
546
+
547
+ Set futures leverage for symbol and margin coin. [CAUTION] Affects risk exposure. Private endpoint. Rate limit: 5 req/s per UID.
548
+
549
+ **Write operation:** Yes — requires confirmation
550
+
551
+ **Parameters:**
552
+
553
+ | Name | Type | Required | Description |
554
+ |------|------|----------|-------------|
555
+ | `productType` | string | Yes | |
556
+ | `symbol` | string | Yes | |
557
+ | `marginCoin` | string | Yes | |
558
+ | `leverage` | string | Yes | |
559
+ | `holdSide` | string | No | |
560
+
561
+ **Example:**
562
+ ```bash
563
+ bgc futures futures_set_leverage --productType <value> --symbol <value>
564
+ ```
565
+
566
+ ### `futures_update_config`
567
+
568
+ Update futures margin mode, position mode, or auto-margin setting. [CAUTION] Affects trading behavior. Private endpoint. Rate limit: 5 req/s per UID.
569
+
570
+ **Write operation:** Yes — requires confirmation
571
+
572
+ **Parameters:**
573
+
574
+ | Name | Type | Required | Description |
575
+ |------|------|----------|-------------|
576
+ | `productType` | string | Yes | |
577
+ | `symbol` | string | Yes | |
578
+ | `marginCoin` | string | Yes | |
579
+ | `setting` | string | Yes | |
580
+ | `value` | string | Yes | |
581
+ | `holdSide` | string | No | |
582
+
583
+ **Example:**
584
+ ```bash
585
+ bgc futures futures_update_config --productType <value> --symbol <value>
586
+ ```
587
+
588
+ ## Module: account
589
+
590
+ ### `get_account_assets`
591
+
592
+ Get spot/futures/funding/all account balances. Private endpoint. Rate limit: 10 req/s per UID.
593
+
594
+ **Write operation:** No
595
+
596
+ **Parameters:**
597
+
598
+ | Name | Type | Required | Description |
599
+ |------|------|----------|-------------|
600
+ | `accountType` | string | No | Target account type. Default all. |
601
+ | `coin` | string | No | Optional coin filter. |
602
+ | `productType` | string | No | Required when accountType=futures. |
603
+
604
+ **Example:**
605
+ ```bash
606
+ bgc account get_account_assets --accountType <value> --coin <value>
607
+ ```
608
+
609
+ ### `get_account_bills`
610
+
611
+ Get account bill records for spot or futures account. Private endpoint. Rate limit: 10 req/s per UID.
612
+
613
+ **Write operation:** No
614
+
615
+ **Parameters:**
616
+
617
+ | Name | Type | Required | Description |
618
+ |------|------|----------|-------------|
619
+ | `accountType` | string | No | |
620
+ | `coin` | string | No | |
621
+ | `productType` | string | No | |
622
+ | `businessType` | string | No | |
623
+ | `startTime` | string | No | |
624
+ | `endTime` | string | No | |
625
+ | `limit` | number | No | |
626
+
627
+ **Example:**
628
+ ```bash
629
+ bgc account get_account_bills --accountType <value> --coin <value>
630
+ ```
631
+
632
+ ### `transfer`
633
+
634
+ Transfer funds between accounts or sub-account. [CAUTION] Moves funds. Private endpoint. Rate limit: 10 req/s per UID.
635
+
636
+ **Write operation:** Yes — requires confirmation
637
+
638
+ **Parameters:**
639
+
640
+ | Name | Type | Required | Description |
641
+ |------|------|----------|-------------|
642
+ | `fromAccountType` | string | Yes | |
643
+ | `toAccountType` | string | Yes | |
644
+ | `coin` | string | Yes | |
645
+ | `amount` | string | Yes | |
646
+ | `subAccountUid` | string | No | |
647
+ | `fromUserId` | string | No | Sub-account user ID (sender). If omitted, subAccountUid is used as fallback. |
648
+ | `toUserId` | string | No | Sub-account user ID (recipient). |
649
+ | `symbol` | string | No | |
650
+ | `clientOid` | string | No | |
651
+
652
+ **Example:**
653
+ ```bash
654
+ bgc account transfer --fromAccountType <value> --toAccountType <value>
655
+ ```
656
+
657
+ ### `withdraw`
658
+
659
+ Withdraw funds to external address. [DANGER] Irreversible fund movement. Private endpoint. Rate limit: 1 req/s per UID.
660
+
661
+ **Write operation:** Yes — requires confirmation
662
+
663
+ **Parameters:**
664
+
665
+ | Name | Type | Required | Description |
666
+ |------|------|----------|-------------|
667
+ | `coin` | string | Yes | |
668
+ | `transferType` | string | Yes | |
669
+ | `address` | string | Yes | |
670
+ | `chain` | string | No | |
671
+ | `amount` | string | Yes | |
672
+ | `tag` | string | No | |
673
+ | `clientOid` | string | No | |
674
+
675
+ **Example:**
676
+ ```bash
677
+ bgc account withdraw --coin <value> --transferType <value>
678
+ ```
679
+
680
+ ### `cancel_withdrawal`
681
+
682
+ Cancel pending withdrawal request by order id. Private endpoint. Rate limit: 10 req/s per UID.
683
+
684
+ **Write operation:** Yes — requires confirmation
685
+
686
+ **Parameters:**
687
+
688
+ | Name | Type | Required | Description |
689
+ |------|------|----------|-------------|
690
+ | `orderId` | string | Yes | Withdrawal order id. |
691
+
692
+ **Example:**
693
+ ```bash
694
+ bgc account cancel_withdrawal --orderId <value>
695
+ ```
696
+
697
+ ### `get_deposit_address`
698
+
699
+ Get deposit address for coin and optional chain. Private endpoint. Rate limit: 10 req/s per UID.
700
+
701
+ **Write operation:** No
702
+
703
+ **Parameters:**
704
+
705
+ | Name | Type | Required | Description |
706
+ |------|------|----------|-------------|
707
+ | `coin` | string | Yes | |
708
+ | `chain` | string | No | |
709
+
710
+ **Example:**
711
+ ```bash
712
+ bgc account get_deposit_address --coin <value> --chain <value>
713
+ ```
714
+
715
+ ### `get_transaction_records`
716
+
717
+ Get deposit, withdrawal, or transfer records. Private endpoint. Rate limit: 10 req/s per UID.
718
+
719
+ **Write operation:** No
720
+
721
+ **Parameters:**
722
+
723
+ | Name | Type | Required | Description |
724
+ |------|------|----------|-------------|
725
+ | `recordType` | string | Yes | |
726
+ | `coin` | string | No | |
727
+ | `startTime` | string | No | |
728
+ | `endTime` | string | No | |
729
+ | `limit` | number | No | |
730
+ | `orderId` | string | No | |
731
+
732
+ **Example:**
733
+ ```bash
734
+ bgc account get_transaction_records --recordType <value> --coin <value>
735
+ ```
736
+
737
+ ### `manage_subaccounts`
738
+
739
+ Create, modify, list subaccounts and manage subaccount API keys. [CAUTION] Account management operation. Private endpoint. Rate limit: 5 req/s per UID.
740
+
741
+ **Write operation:** Yes — requires confirmation
742
+
743
+ **Parameters:**
744
+
745
+ | Name | Type | Required | Description |
746
+ |------|------|----------|-------------|
747
+ | `action` | string | Yes | |
748
+ | `subAccountName` | string | No | |
749
+ | `subAccountUid` | string | No | |
750
+ | `remark` | string | No | |
751
+ | `permList` | array | No | Permission list (required for modify, createApiKey, modifyApiKey). |
752
+ | `status` | string | No | Sub-account status (required for modify). |
753
+ | `apiKeyPermissions` | string | No | Single permission string (backward compat; prefer permList). |
754
+ | `apiKeyIp` | string | No | Single IP string (backward compat; prefer ipList). |
755
+ | `apiKeyPassphrase` | string | No | |
756
+ | `label` | string | No | API key label (required for createApiKey/modifyApiKey). |
757
+ | `subAccountApiKey` | string | No | The API key to modify (required for modifyApiKey). |
758
+
759
+ **Example:**
760
+ ```bash
761
+ bgc account manage_subaccounts --action <value> --subAccountName <value>
762
+ ```
763
+
764
+ ## Module: margin
765
+
766
+ ### `margin_get_assets`
767
+
768
+ Get crossed or isolated margin assets and risk metrics. Private endpoint. Rate limit: 10 req/s per UID.
769
+
770
+ **Write operation:** No
771
+
772
+ **Parameters:**
773
+
774
+ | Name | Type | Required | Description |
775
+ |------|------|----------|-------------|
776
+ | `marginType` | string | Yes | |
777
+ | `symbol` | string | No | |
778
+ | `coin` | string | No | |
779
+
780
+ **Example:**
781
+ ```bash
782
+ bgc margin margin_get_assets --marginType <value> --symbol <value>
783
+ ```
784
+
785
+ ### `margin_borrow`
786
+
787
+ Borrow margin funds. [CAUTION] Creates debt. Private endpoint. Rate limit: 10 req/s per UID.
788
+
789
+ **Write operation:** Yes — requires confirmation
790
+
791
+ **Parameters:**
792
+
793
+ | Name | Type | Required | Description |
794
+ |------|------|----------|-------------|
795
+ | `marginType` | string | Yes | |
796
+ | `coin` | string | Yes | |
797
+ | `amount` | string | Yes | |
798
+ | `symbol` | string | No | Required for isolated margin. |
799
+
800
+ **Example:**
801
+ ```bash
802
+ bgc margin margin_borrow --marginType <value> --coin <value>
803
+ ```
804
+
805
+ ### `margin_repay`
806
+
807
+ Repay margin debt with optional flash repay. [CAUTION] Uses account funds. Private endpoint. Rate limit: 10 req/s per UID. For flash repay, coin is optional (omit to repay all). For isolated flash repay, symbol filters which pairs to repay.
808
+
809
+ **Write operation:** Yes — requires confirmation
810
+
811
+ **Parameters:**
812
+
813
+ | Name | Type | Required | Description |
814
+ |------|------|----------|-------------|
815
+ | `marginType` | string | Yes | |
816
+ | `coin` | string | No | Required for regular repay. Optional for flash repay (omit to repay all). |
817
+ | `amount` | string | No | Required for regular repay. |
818
+ | `symbol` | string | No | Required for isolated regular repay. Optional for isolated flash repay. |
819
+ | `flashRepay` | boolean | No | |
820
+
821
+ **Example:**
822
+ ```bash
823
+ bgc margin margin_repay --marginType <value> --coin <value>
824
+ ```
825
+
826
+ ### `margin_place_order`
827
+
828
+ Place margin order in crossed or isolated mode. [CAUTION] Executes real trade. Private endpoint. Rate limit: 10 req/s per UID. For market buy orders, use quoteSize (quote currency amount) instead of size.
829
+
830
+ **Write operation:** Yes — requires confirmation
831
+
832
+ **Parameters:**
833
+
834
+ | Name | Type | Required | Description |
835
+ |------|------|----------|-------------|
836
+ | `marginType` | string | Yes | |
837
+ | `symbol` | string | Yes | |
838
+ | `side` | string | Yes | |
839
+ | `orderType` | string | Yes | |
840
+ | `price` | string | No | |
841
+ | `size` | string | No | Base currency size. For market buy, use quoteSize instead. |
842
+ | `quoteSize` | string | No | Quote currency size. Required for market buy orders. |
843
+ | `loanType` | string | No | |
844
+
845
+ **Example:**
846
+ ```bash
847
+ bgc margin margin_place_order --marginType <value> --symbol <value>
848
+ ```
849
+
850
+ ### `margin_cancel_orders`
851
+
852
+ Cancel one or more margin orders. Private endpoint. Rate limit: 10 req/s per UID.
853
+
854
+ **Write operation:** Yes — requires confirmation
855
+
856
+ **Parameters:**
857
+
858
+ | Name | Type | Required | Description |
859
+ |------|------|----------|-------------|
860
+ | `marginType` | string | Yes | |
861
+ | `symbol` | string | Yes | |
862
+ | `orderId` | string | No | |
863
+ | `orderIds` | array | No | |
864
+
865
+ **Example:**
866
+ ```bash
867
+ bgc margin margin_cancel_orders --marginType <value> --symbol <value>
868
+ ```
869
+
870
+ ### `margin_get_orders`
871
+
872
+ Query margin orders (open/history/order detail). Private endpoint. Rate limit: 10 req/s per UID. Note: symbol and startTime are required by the API for open-orders queries.
873
+
874
+ **Write operation:** No
875
+
876
+ **Parameters:**
877
+
878
+ | Name | Type | Required | Description |
879
+ |------|------|----------|-------------|
880
+ | `marginType` | string | Yes | |
881
+ | `symbol` | string | No | Required for open-orders queries per API docs. |
882
+ | `orderId` | string | No | |
883
+ | `status` | string | No | |
884
+ | `startTime` | string | No | Required for open-orders queries per API docs. |
885
+ | `endTime` | string | No | |
886
+ | `limit` | number | No | |
887
+
888
+ **Example:**
889
+ ```bash
890
+ bgc margin margin_get_orders --marginType <value> --symbol <value>
891
+ ```
892
+
893
+ ### `margin_get_records`
894
+
895
+ Get borrow/repay/interest/liquidation records for margin accounts. Private endpoint. Rate limit: 10 req/s per UID.
896
+
897
+ **Write operation:** No
898
+
899
+ **Parameters:**
900
+
901
+ | Name | Type | Required | Description |
902
+ |------|------|----------|-------------|
903
+ | `marginType` | string | Yes | |
904
+ | `recordType` | string | Yes | |
905
+ | `coin` | string | No | |
906
+ | `symbol` | string | No | |
907
+ | `startTime` | string | No | |
908
+ | `endTime` | string | No | |
909
+ | `limit` | number | No | |
910
+
911
+ **Example:**
912
+ ```bash
913
+ bgc margin margin_get_records --marginType <value> --recordType <value>
914
+ ```
915
+
916
+ ## Module: copytrading
917
+
918
+ ### `copy_get_traders`
919
+
920
+ Get copy-trading trader list and configuration candidates. Private endpoint. Rate limit: 10 req/s per UID.
921
+
922
+ **Write operation:** No
923
+
924
+ **Parameters:**
925
+
926
+ | Name | Type | Required | Description |
927
+ |------|------|----------|-------------|
928
+ | `productType` | string | No | Copy trading market type. |
929
+ | `symbol` | string | No | Optional symbol filter for spot copy. |
930
+ | `limit` | number | No | Page size, default 20. |
931
+
932
+ **Example:**
933
+ ```bash
934
+ bgc copytrading copy_get_traders --productType <value> --symbol <value>
935
+ ```
936
+
937
+ ### `copy_place_order`
938
+
939
+ Create or update copy-trading follow settings. [CAUTION] Changes copy-trading behavior. Private endpoint. Rate limit: 10 req/s per UID.
940
+
941
+ **Write operation:** Yes — requires confirmation
942
+
943
+ **Parameters:**
944
+
945
+ | Name | Type | Required | Description |
946
+ |------|------|----------|-------------|
947
+ | `productType` | string | Yes | |
948
+ | `traderId` | string | No | Required trader id. |
949
+ | `symbol` | string | No | Symbol for copy settings. |
950
+ | `leverageType` | string | No | Futures copy leverage type. Default position. |
951
+ | `traceType` | string | No | Copy size mode. Default amount. |
952
+ | `marginType` | string | No | Futures margin type. Default trader. |
953
+ | `amount` | string | No | Trace amount/value (mapped to traceValue). |
954
+ | `ratio` | string | No | Trace ratio (mapped to traceValue when traceType=ratio). |
955
+ | `maxHoldSize` | string | No | Max hold size for spot copy settings. |
956
+ | `autoSelectTrader` | boolean | No | When true (or traderId omitted), auto-select trader from query-traders list. |
957
+ | `selectionPolicy` | string | No | Trader auto-selection policy. Default recommended. |
958
+ | `dryRun` | boolean | No | When true, resolve trader and return payload preview without sending write request. |
959
+
960
+ **Example:**
961
+ ```bash
962
+ bgc copytrading copy_place_order --productType <value> --traderId <value>
963
+ ```
964
+
965
+ ### `copy_close_position`
966
+
967
+ Close copy-trading follower position (futures). [CAUTION] Closes positions. Private endpoint. Rate limit: 10 req/s per UID.
968
+
969
+ **Write operation:** Yes — requires confirmation
970
+
971
+ **Parameters:**
972
+
973
+ | Name | Type | Required | Description |
974
+ |------|------|----------|-------------|
975
+ | `productType` | string | Yes | |
976
+ | `symbol` | string | Yes | |
977
+ | `subPosId` | string | No | Tracking number (maps to trackingNo). |
978
+ | `marginCoin` | string | No | |
979
+ | `marginMode` | string | No | |
980
+ | `holdSide` | string | No | |
981
+
982
+ **Example:**
983
+ ```bash
984
+ bgc copytrading copy_close_position --productType <value> --symbol <value>
985
+ ```
986
+
987
+ ### `copy_get_orders`
988
+
989
+ Query copy-trading historical orders. Private endpoint. Rate limit: 10 req/s per UID.
990
+
991
+ **Write operation:** No
992
+
993
+ **Parameters:**
994
+
995
+ | Name | Type | Required | Description |
996
+ |------|------|----------|-------------|
997
+ | `productType` | string | Yes | |
998
+ | `symbol` | string | No | |
999
+ | `startTime` | string | No | |
1000
+ | `endTime` | string | No | |
1001
+ | `limit` | number | No | |
1002
+ | `traderId` | string | No | Optional trader id filter. |
1003
+
1004
+ **Example:**
1005
+ ```bash
1006
+ bgc copytrading copy_get_orders --productType <value> --symbol <value>
1007
+ ```
1008
+
1009
+ ### `copy_get_positions`
1010
+
1011
+ Get current or historical copy-trading positions/orders. Private endpoint. Rate limit: 10 req/s per UID.
1012
+
1013
+ **Write operation:** No
1014
+
1015
+ **Parameters:**
1016
+
1017
+ | Name | Type | Required | Description |
1018
+ |------|------|----------|-------------|
1019
+ | `productType` | string | Yes | |
1020
+ | `symbol` | string | No | |
1021
+ | `history` | boolean | No | |
1022
+ | `startTime` | string | No | |
1023
+ | `endTime` | string | No | |
1024
+ | `limit` | number | No | |
1025
+ | `traderId` | string | No | |
1026
+
1027
+ **Example:**
1028
+ ```bash
1029
+ bgc copytrading copy_get_positions --productType <value> --symbol <value>
1030
+ ```
1031
+
1032
+ ## Module: convert
1033
+
1034
+ ### `convert_get_quote`
1035
+
1036
+ Get supported convert currencies or quoted conversion price. Private endpoint. Rate limit: 10 req/s per UID.
1037
+
1038
+ **Write operation:** No
1039
+
1040
+ **Parameters:**
1041
+
1042
+ | Name | Type | Required | Description |
1043
+ |------|------|----------|-------------|
1044
+ | `fromCoin` | string | No | |
1045
+ | `toCoin` | string | No | |
1046
+ | `fromCoinAmount` | string | No | |
1047
+ | `toCoinAmount` | string | No | |
1048
+
1049
+ **Example:**
1050
+ ```bash
1051
+ bgc convert convert_get_quote --fromCoin <value> --toCoin <value>
1052
+ ```
1053
+
1054
+ ### `convert_execute`
1055
+
1056
+ Execute normal conversion or BGB small balance sweep. [CAUTION] Converts funds. Private endpoint. Rate limit: 5 req/s per UID.
1057
+
1058
+ **Write operation:** Yes — requires confirmation
1059
+
1060
+ **Parameters:**
1061
+
1062
+ | Name | Type | Required | Description |
1063
+ |------|------|----------|-------------|
1064
+ | `type` | string | No | |
1065
+ | `fromCoin` | string | Yes | |
1066
+ | `toCoin` | string | Yes | |
1067
+ | `fromCoinAmount` | string | No | |
1068
+ | `toCoinAmount` | string | No | |
1069
+ | `traceId` | string | No | |
1070
+ | `coinList` | array | No | |
1071
+
1072
+ **Example:**
1073
+ ```bash
1074
+ bgc convert convert_execute --type <value> --fromCoin <value>
1075
+ ```
1076
+
1077
+ ### `convert_get_history`
1078
+
1079
+ Get conversion or BGB sweep history. Private endpoint. Rate limit: 10 req/s per UID.
1080
+
1081
+ **Write operation:** No
1082
+
1083
+ **Parameters:**
1084
+
1085
+ | Name | Type | Required | Description |
1086
+ |------|------|----------|-------------|
1087
+ | `type` | string | No | |
1088
+ | `startTime` | string | No | |
1089
+ | `endTime` | string | No | |
1090
+ | `limit` | number | No | |
1091
+
1092
+ **Example:**
1093
+ ```bash
1094
+ bgc convert convert_get_history --type <value> --startTime <value>
1095
+ ```
1096
+
1097
+ ## Module: earn
1098
+
1099
+ ### `earn_get_products`
1100
+
1101
+ Query available earn products such as savings and staking. Private endpoint. Rate limit: 10 req/s per UID.
1102
+
1103
+ **Write operation:** No
1104
+
1105
+ **Parameters:**
1106
+
1107
+ | Name | Type | Required | Description |
1108
+ |------|------|----------|-------------|
1109
+ | `coin` | string | No | |
1110
+ | `filter` | string | No | |
1111
+
1112
+ **Example:**
1113
+ ```bash
1114
+ bgc earn earn_get_products --coin <value> --filter <value>
1115
+ ```
1116
+
1117
+ ### `earn_subscribe_redeem`
1118
+
1119
+ Subscribe or redeem earn products. [CAUTION] Locks/releases funds. Private endpoint. Rate limit: 5 req/s per UID.
1120
+
1121
+ **Write operation:** Yes — requires confirmation
1122
+
1123
+ **Parameters:**
1124
+
1125
+ | Name | Type | Required | Description |
1126
+ |------|------|----------|-------------|
1127
+ | `action` | string | Yes | |
1128
+ | `productId` | string | Yes | |
1129
+ | `amount` | string | Yes | |
1130
+ | `periodType` | string | Yes | |
1131
+ | `orderId` | string | No | |
1132
+
1133
+ **Example:**
1134
+ ```bash
1135
+ bgc earn earn_subscribe_redeem --action <value> --productId <value>
1136
+ ```
1137
+
1138
+ ### `earn_get_holdings`
1139
+
1140
+ Get current earn holdings and earnings records. Private endpoint. Rate limit: 10 req/s per UID.
1141
+
1142
+ **Write operation:** No
1143
+
1144
+ **Parameters:**
1145
+
1146
+ | Name | Type | Required | Description |
1147
+ |------|------|----------|-------------|
1148
+ | `coin` | string | No | |
1149
+ | `periodType` | string | Yes | |
1150
+
1151
+ **Example:**
1152
+ ```bash
1153
+ bgc earn earn_get_holdings --coin <value> --periodType <value>
1154
+ ```
1155
+
1156
+ ## Module: p2p
1157
+
1158
+ ### `p2p_get_merchants`
1159
+
1160
+ Get P2P merchant list or specific merchant details. Private endpoint. Rate limit: 10 req/s per UID.
1161
+
1162
+ **Write operation:** No
1163
+
1164
+ **Parameters:**
1165
+
1166
+ | Name | Type | Required | Description |
1167
+ |------|------|----------|-------------|
1168
+ | `merchantId` | string | No | |
1169
+
1170
+ **Example:**
1171
+ ```bash
1172
+ bgc p2p p2p_get_merchants --merchantId <value>
1173
+ ```
1174
+
1175
+ ### `p2p_get_orders`
1176
+
1177
+ Get P2P order list or advertisement list. Private endpoint. Rate limit: 10 req/s per UID.
1178
+
1179
+ **Write operation:** No
1180
+
1181
+ **Parameters:**
1182
+
1183
+ | Name | Type | Required | Description |
1184
+ |------|------|----------|-------------|
1185
+ | `type` | string | No | orders(default) or advertisements. |
1186
+ | `status` | string | No | |
1187
+ | `startTime` | string | No | |
1188
+ | `endTime` | string | No | |
1189
+ | `side` | string | No | Required for advertisements: buy or sell. |
1190
+ | `coin` | string | No | Required for advertisements: coin to trade. |
1191
+ | `fiat` | string | No | Required for advertisements: fiat currency. |
1192
+
1193
+ **Example:**
1194
+ ```bash
1195
+ bgc p2p p2p_get_orders --type <value> --status <value>
1196
+ ```
1197
+
1198
+ ## Module: broker
1199
+
1200
+ ### `broker_get_info`
1201
+
1202
+ Get broker account information and commission data. Private endpoint. Rate limit: 10 req/s per UID.
1203
+
1204
+ **Write operation:** No
1205
+
1206
+ **Example:**
1207
+ ```bash
1208
+ bgc broker broker_get_info
1209
+ ```
1210
+
1211
+ ### `broker_manage_subaccounts`
1212
+
1213
+ Create, modify, or list broker subaccounts. Private endpoint. Rate limit: 5 req/s per UID.
1214
+
1215
+ **Write operation:** Yes — requires confirmation
1216
+
1217
+ **Parameters:**
1218
+
1219
+ | Name | Type | Required | Description |
1220
+ |------|------|----------|-------------|
1221
+ | `action` | string | Yes | |
1222
+ | `subAccountUid` | string | No | |
1223
+ | `subAccountName` | string | No | |
1224
+ | `permList` | array | No | |
1225
+ | `status` | string | No | |
1226
+ | `limit` | number | No | |
1227
+ | `idLessThan` | string | No | |
1228
+ | `startTime` | string | No | |
1229
+ | `endTime` | string | No | |
1230
+
1231
+ **Example:**
1232
+ ```bash
1233
+ bgc broker broker_manage_subaccounts --action <value> --subAccountUid <value>
1234
+ ```
1235
+
1236
+ ### `broker_manage_apikeys`
1237
+
1238
+ Create, modify, list, or delete API keys for broker subaccounts. Private endpoint. Rate limit: 5 req/s per UID.
1239
+
1240
+ **Write operation:** Yes — requires confirmation
1241
+
1242
+ **Parameters:**
1243
+
1244
+ | Name | Type | Required | Description |
1245
+ |------|------|----------|-------------|
1246
+ | `action` | string | Yes | |
1247
+ | `subAccountUid` | string | Yes | |
1248
+ | `apiKeyPermissions` | string | No | |
1249
+ | `apiKeyIp` | string | No | |
1250
+ | `apiKeyPassphrase` | string | No | |
1251
+ | `label` | string | No | |
1252
+ | `permType` | string | No | |
1253
+ | `apiKey` | string | No | |
1254
+
1255
+ **Example:**
1256
+ ```bash
1257
+ bgc broker broker_manage_apikeys --action <value> --subAccountUid <value>
1258
+ ```