@bitget-ai/bitget-agent-skill 3.4.1 → 4.0.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.
@@ -1,2387 +0,0 @@
1
- # bgc Command Reference (UTA / v3)
2
-
3
- Auto-generated from `@bitget-ai/bitget-agent-sdk` v3.0.0 (OpenAPI spec 3.0.0, 109 operations, UTA (Unified Trading Account) v3).
4
- Do not edit by hand — run `npm run gen-references`.
5
-
6
- This catalog is the **static** mirror of the live surface. For a verb's exact, doc-grounded contract at any moment, run `bgc discover --tool <verb> --action <name>`.
7
-
8
- ## Grammar
9
-
10
- ```
11
- bgc <tool> [--action <name>] [--<param> <value> ...] [global flags]
12
- bgc discover [--domain <d> | --tool <t> [--action <a>] | --search <q>]
13
- bgc raw --operationId <id> [--args '<json>']
14
- ```
15
-
16
- One verb per call. `--action` selects the intent for action-routed verbs. Values coerce by shape: `true`/`false` → boolean, a value starting with `[` or `{` → JSON (e.g. `--orders '[{...}]'`), everything else stays a string. Output is JSON on stdout (exit 0); errors are a JSON payload on stderr (exit 1).
17
-
18
- ## Global flags
19
-
20
- | Flag | Effect |
21
- |------|--------|
22
- | `--action <name>` | Action for an action-routed verb |
23
- | `--modules <list>` | Modules to enable (CLI default: `all`). Name a hidden to-B module to expose it, e.g. `--modules broker` |
24
- | `--surface <mode>` | `intent` (default) or `full` (also expose the 1:1 generated operations) |
25
- | `--full` | Shorthand for `--surface full` |
26
- | `--read-only` | Block all writes (mutually exclusive with `--paper-trading`) |
27
- | `--paper-trading` | Route writes to the Bitget demo environment (needs demo credentials) |
28
- | `--dry-run` | Preview a write without sending it (maps to `dryRun`) |
29
- | `--confirm` | Required to execute destructive (high-risk) writes |
30
- | `--base-url <url>` | Override API base URL (else `BITGET_API_BASE_URL`) |
31
- | `--timeout <ms>` | Per-request timeout (else `BITGET_TIMEOUT_MS`, default 15000) |
32
- | `--pretty` | Pretty-print JSON output |
33
- | `--help`, `--version` | Help / version |
34
-
35
- ## Write safety
36
-
37
- Every operation is graded **read** < **write** < **high**. Reads run freely. Writes honor `--dry-run`, `--read-only`, and `--paper-trading`. **High-risk** operations refuse to run without `--confirm` — without it the call returns `{ confirmationRequired: true }` (a normal result on stdout, not an error).
38
-
39
- High-risk operations (require `--confirm`): `closeAllPositions`, `cancelAllOrders`, `withdrawal`, `brokerSubaccountWithdrawal`.
40
-
41
- Common params available on most verbs (not repeated in the tables below): `dryRun`, `confirm` (writes); `view` (`summary`|`full`) and `fields` (read normalization / token economy); `fetchAll`, `cursor`, `limit` (paginated reads).
42
-
43
- ## Domains
44
-
45
- - **market** — [`market`](#market)
46
- - **trade** — [`order`](#order), [`position`](#position), [`strategy_order`](#strategy-order)
47
- - **account** — [`account_overview`](#account-overview), [`account_config`](#account-config), [`repayment`](#repayment)
48
- - **funds** — [`transfer_funds`](#transfer-funds), [`deposit`](#deposit), [`withdraw`](#withdraw), [`funds_records`](#funds-records)
49
- - **subaccount** — [`subaccount`](#subaccount)
50
- - **broker** — [`broker`](#broker)
51
- - **loan** — [`loan`](#loan)
52
- - **instloan** — [`inst_loan`](#inst-loan)
53
- - **tax** — [`tax`](#tax)
54
- - **meta** — [`raw`](#raw), [`discover`](#discover)
55
-
56
- ## Domain: market
57
-
58
- ### `market`
59
-
60
- risk: **read** · write: no · auth: public
61
-
62
- [VERB] Public market data: tickers, orderbook, candles, instruments, funding rate, open interest, recent fills, and reference reads (no credentials required).
63
-
64
- **Actions:** `tickers`, `orderbook`, `candles`, `candlesHistory`, `instruments`, `fundingRate`, `fundingRateHistory`, `openInterest`, `openInterestLimit`, `recentFills`, `positionTier`, `discountRate`, `indexComponents`, `marginLoan`, `proofOfReserves`, `riskReserve`
65
-
66
- #### `bgc market --action tickers`
67
-
68
- `GET /api/v3/market/tickers` · public
69
-
70
- Get Tickers
71
-
72
- Required:
73
-
74
- | Param | Type | Enum | Description |
75
- |-------|------|------|-------------|
76
- | `category` | string | `SPOT` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
77
-
78
- Optional:
79
-
80
- | Param | Type | Enum | Description |
81
- |-------|------|------|-------------|
82
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
83
-
84
- ```bash
85
- bgc market --action tickers --category <category>
86
- ```
87
-
88
- #### `bgc market --action orderbook`
89
-
90
- `GET /api/v3/market/orderbook` · public
91
-
92
- Get OrderBook
93
-
94
- Required:
95
-
96
- | Param | Type | Enum | Description |
97
- |-------|------|------|-------------|
98
- | `category` | string | `SPOT` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type SPOT Spot trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
99
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
100
-
101
- Optional:
102
-
103
- | Param | Type | Enum | Description |
104
- |-------|------|------|-------------|
105
- | `limit` | string | | Level Default: 5. Maximum: 200 |
106
-
107
- ```bash
108
- bgc market --action orderbook --category <category> --symbol <symbol>
109
- ```
110
-
111
- #### `bgc market --action candles`
112
-
113
- `GET /api/v3/market/candles` · public
114
-
115
- Get Kline/Candlestick
116
-
117
- Required:
118
-
119
- | Param | Type | Enum | Description |
120
- |-------|------|------|-------------|
121
- | `category` | string | `SPOT` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type SPOT Spot trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
122
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
123
- | `interval` | string | `1m` \| `3m` \| `5m` \| `15m` \| `30m` \| `1H` \| `4H` \| `6H` \| `12H` \| `1D` | Granularity 1m,3m,5m,15m,30m,1H,4H,6H,12H,1D |
124
-
125
- Optional:
126
-
127
- | Param | Type | Enum | Description |
128
- |-------|------|------|-------------|
129
- | `startTime` | string | | Start timestamp A Unix millisecond timestamp, e.g.,1672410780000 |
130
- | `endTime` | string | | End timestamp A Unix millisecond timestamp, e.g.,1672410781000 |
131
- | `type` | string | `market` \| `mark` \| `index` \| `premium` | Candlestick type market, mark, index, premium. Default: market |
132
- | `limit` | string | | Limit per page Default:1000. Maximum: 100 |
133
-
134
- ```bash
135
- bgc market --action candles --category <category> --symbol <symbol> --interval <interval>
136
- ```
137
-
138
- #### `bgc market --action candlesHistory`
139
-
140
- `GET /api/v3/market/history-candles` · public
141
-
142
- Get Kline/Candlestick History
143
-
144
- Required:
145
-
146
- | Param | Type | Enum | Description |
147
- |-------|------|------|-------------|
148
- | `category` | string | `SPOT` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type SPOT Spot trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
149
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
150
- | `interval` | string | `1m` \| `3m` \| `5m` \| `15m` \| `30m` \| `1H` \| `4H` \| `6H` \| `12H` \| `1D` | Granularity 1m,3m,5m,15m,30m,1H,4H,6H,12H,1D |
151
-
152
- Optional:
153
-
154
- | Param | Type | Enum | Description |
155
- |-------|------|------|-------------|
156
- | `startTime` | string | | Start timestamp A Unix millisecond timestamp, e.g.,1672410780000 Request data after this start time (the maximum time query range is 90 days) |
157
- | `endTime` | string | | End timestamp A Unix millisecond timestamp, e.g.,1672410781000 Request data before this end time (the maximum time query range is 90 days) |
158
- | `type` | string | `market` \| `mark` \| `index` \| `premium` | Candlestick type market, mark, index, premium. Default: market |
159
- | `limit` | string | | Limit per page Default:100. Maximum: 100 |
160
-
161
- ```bash
162
- bgc market --action candlesHistory --category <category> --symbol <symbol> --interval <interval>
163
- ```
164
-
165
- #### `bgc market --action instruments`
166
-
167
- `GET /api/v3/market/instruments` · public
168
-
169
- Get Instruments
170
-
171
- Required:
172
-
173
- | Param | Type | Enum | Description |
174
- |-------|------|------|-------------|
175
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
176
-
177
- Optional:
178
-
179
- | Param | Type | Enum | Description |
180
- |-------|------|------|-------------|
181
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
182
-
183
- ```bash
184
- bgc market --action instruments --category <category>
185
- ```
186
-
187
- #### `bgc market --action fundingRate`
188
-
189
- `GET /api/v3/market/current-fund-rate` · public
190
-
191
- Get Current Funding Rate
192
-
193
- Required:
194
-
195
- | Param | Type | Enum | Description |
196
- |-------|------|------|-------------|
197
- | `symbol` | string | | Trading pair, based on the symbolName, i.e. BTCUSDT |
198
-
199
- ```bash
200
- bgc market --action fundingRate --symbol <symbol>
201
- ```
202
-
203
- #### `bgc market --action fundingRateHistory`
204
-
205
- `GET /api/v3/market/history-fund-rate` · public
206
-
207
- Get Funding Rate History
208
-
209
- Required:
210
-
211
- | Param | Type | Enum | Description |
212
- |-------|------|------|-------------|
213
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
214
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
215
-
216
- Optional:
217
-
218
- | Param | Type | Enum | Description |
219
- |-------|------|------|-------------|
220
- | `cursor` | string | | Page number Default: 1. Maximum: 100 |
221
- | `limit` | string | | Limit per page Default: 200. Maximum: 200 |
222
-
223
- ```bash
224
- bgc market --action fundingRateHistory --category <category> --symbol <symbol>
225
- ```
226
-
227
- #### `bgc market --action openInterest`
228
-
229
- `GET /api/v3/market/open-interest` · public
230
-
231
- Get Open Interest
232
-
233
- Required:
234
-
235
- | Param | Type | Enum | Description |
236
- |-------|------|------|-------------|
237
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
238
-
239
- Optional:
240
-
241
- | Param | Type | Enum | Description |
242
- |-------|------|------|-------------|
243
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
244
-
245
- ```bash
246
- bgc market --action openInterest --category <category>
247
- ```
248
-
249
- #### `bgc market --action openInterestLimit`
250
-
251
- `GET /api/v3/market/oi-limit` · public
252
-
253
- Get Open Interest Limit
254
-
255
- Required:
256
-
257
- | Param | Type | Enum | Description |
258
- |-------|------|------|-------------|
259
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures |
260
-
261
- Optional:
262
-
263
- | Param | Type | Enum | Description |
264
- |-------|------|------|-------------|
265
- | `symbol` | string | | Trading pair, based on the symbolName, i.e. BTCUSDT |
266
-
267
- ```bash
268
- bgc market --action openInterestLimit --category <category>
269
- ```
270
-
271
- #### `bgc market --action recentFills`
272
-
273
- `GET /api/v3/market/fills` · public
274
-
275
- Get Recent Public Fills
276
-
277
- Required:
278
-
279
- | Param | Type | Enum | Description |
280
- |-------|------|------|-------------|
281
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product Type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
282
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
283
-
284
- Optional:
285
-
286
- | Param | Type | Enum | Description |
287
- |-------|------|------|-------------|
288
- | `limit` | string | | Limit per page Default: 100. Maximum: 100 |
289
-
290
- ```bash
291
- bgc market --action recentFills --category <category> --symbol <symbol>
292
- ```
293
-
294
- #### `bgc market --action positionTier`
295
-
296
- `GET /api/v3/market/position-tier` · public
297
-
298
- Get Position Tier
299
-
300
- Required:
301
-
302
- | Param | Type | Enum | Description |
303
- |-------|------|------|-------------|
304
- | `category` | string | `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
305
-
306
- Optional:
307
-
308
- | Param | Type | Enum | Description |
309
- |-------|------|------|-------------|
310
- | `symbol` | string | | Symbol name e.g.,BTCUSDT, applies to Futures |
311
- | `coin` | string | | Coin name e.g.,BTC, applies to Margin |
312
-
313
- ```bash
314
- bgc market --action positionTier --category <category>
315
- ```
316
-
317
- #### `bgc market --action discountRate`
318
-
319
- `GET /api/v3/market/discount-rate` · public
320
-
321
- Get Discount Rate
322
-
323
- _No business parameters._
324
-
325
- ```bash
326
- bgc market --action discountRate
327
- ```
328
-
329
- #### `bgc market --action indexComponents`
330
-
331
- `GET /api/v3/market/index-components` · public
332
-
333
- Get Index Price Components
334
-
335
- Required:
336
-
337
- | Param | Type | Enum | Description |
338
- |-------|------|------|-------------|
339
- | `symbol` | string | | Trading pair, e.g. BTCUSDT |
340
-
341
- ```bash
342
- bgc market --action indexComponents --symbol <symbol>
343
- ```
344
-
345
- #### `bgc market --action marginLoan`
346
-
347
- `GET /api/v3/market/margin-loans` · public
348
-
349
- Get Margin Loan
350
-
351
- Required:
352
-
353
- | Param | Type | Enum | Description |
354
- |-------|------|------|-------------|
355
- | `coin` | string | | Coin name e.g.,BTC |
356
-
357
- ```bash
358
- bgc market --action marginLoan --coin <coin>
359
- ```
360
-
361
- #### `bgc market --action proofOfReserves`
362
-
363
- `GET /api/v3/market/proof-of-reserves` · public
364
-
365
- Get Proof Of Reserves
366
-
367
- _No business parameters._
368
-
369
- ```bash
370
- bgc market --action proofOfReserves
371
- ```
372
-
373
- #### `bgc market --action riskReserve`
374
-
375
- `GET /api/v3/market/risk-reserve` · public
376
-
377
- Get Risk Reserve
378
-
379
- Required:
380
-
381
- | Param | Type | Enum | Description |
382
- |-------|------|------|-------------|
383
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
384
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
385
-
386
- Optional:
387
-
388
- | Param | Type | Enum | Description |
389
- |-------|------|------|-------------|
390
- | `marginCoin` | string | | Margin coin, It is required when the category is COIN-FUTURES |
391
-
392
- ```bash
393
- bgc market --action riskReserve --category <category> --symbol <symbol>
394
- ```
395
-
396
- ## Domain: trade
397
-
398
- ### `order`
399
-
400
- risk: **write** · write: no · auth: private
401
-
402
- [VERB] Manage orders by intent: place/cancel/modify (single or batch via `orders`), cancelAll, countdownCancel, plus open/detail/history/fills reads. Writes honor dryRun/confirm/readOnly; cancelAll requires confirm.
403
-
404
- **Actions:** `place`, `cancel`, `modify`, `cancelAll`, `countdownCancel`, `open`, `detail`, `history`, `fills`, `maxOpen`
405
-
406
- #### `bgc order --action place`
407
-
408
- `POST /api/v3/trade/place-order` · private · write
409
-
410
- Place Order
411
-
412
- Required:
413
-
414
- | Param | Type | Enum | Description |
415
- |-------|------|------|-------------|
416
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
417
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
418
- | `qty` | string | | Order quantity Spot/Margin For market buy orders,the unit is quote coin For limit and market sell orders, the unit is base coin USDT/USDC-Futures The unit is base coin COIN-Futures The unit is quote coin |
419
- | `side` | string | `buy` \| `sell` | Order side buy/sell |
420
- | `orderType` | string | `limit` \| `market` | Order type limit/market |
421
-
422
- Optional:
423
-
424
- | Param | Type | Enum | Description |
425
- |-------|------|------|-------------|
426
- | `price` | string | | Order price This field is required when the order type is a limit order . This field is not applicable when the order type is a market order. |
427
- | `timeInForce` | string | `ioc` \| `fok` \| `gtc` \| `post_only` | Time in force ioc Immediate or cancel. It must be executed immediately, with any unfilled portion canceled. fok Fill or kill. It must be fully executed immediately, or it is canceled entirely. gtc Good 'til canceled. It… |
428
- | `posSide` | string | `long` \| `short` | Position side long/short This field is required in hedge-mode position. Available only for futures |
429
- | `clientOid` | string | | Client order ID |
430
- | `reduceOnly` | string | `yes` \| `no` | Reduce-only identifier yes/no, default no; yes indicates that your position may only be reduced in size upon the activation of this order |
431
- | `stpMode` | string | `none` \| `cancel_taker` \| `cancel_maker` \| `cancel_both` | STP Mode(Self Trade Prevention) none: not setting STP(default) cancel_taker: cancel taker order cancel_maker: cancel maker order cancel_both: cancel both of taker and maker orders |
432
- | `tpTriggerBy` | string | `market` \| `mark` | Preset Take-Profit Trigger Type market: Market Price mark: Mark Price If not specified, the default value is market price Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and U… |
433
- | `slTriggerBy` | string | `market` \| `mark` | Preset Stop-Loss Trigger Type market: Market Price mark: Mark Price If not filled in, the default value is market price Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and USD… |
434
- | `takeProfit` | string | | Preset Take-Profit Trigger Price |
435
- | `stopLoss` | string | | Preset Stop-Loss Trigger Price |
436
- | `tpOrderType` | string | `limit` \| `market` | Take-Profit Trigger Strategy Order Type limit: Limit Order market: Market Order |
437
- | `slOrderType` | string | `limit` \| `market` | Stop-Loss Trigger Strategy Order Type limit: Limit Order market: Market Order |
438
- | `tpLimitPrice` | string | | Take-Profit Strategy Order Execution Price This field is only valid for limit orders (when tpOrderType=limit); it is ignored for market orders. |
439
- | `slLimitPrice` | string | | Stop-Loss Strategy Order Execution Price This field is only valid for limit orders (when slOrderType=limit); it is ignored for market orders. |
440
-
441
- ```bash
442
- bgc order --action place --category <category> --symbol <symbol> --qty <qty> --side <side> --orderType <orderType>
443
- ```
444
-
445
- #### `bgc order --action cancel`
446
-
447
- `POST /api/v3/trade/cancel-order` · private · write
448
-
449
- Cancel Order
450
-
451
- Optional:
452
-
453
- | Param | Type | Enum | Description |
454
- |-------|------|------|-------------|
455
- | `orderId` | string | | Order ID Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
456
- | `clientOid` | string | | Client order ID Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
457
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
458
-
459
- ```bash
460
- bgc order --action cancel
461
- ```
462
-
463
- #### `bgc order --action modify`
464
-
465
- `POST /api/v3/trade/modify-order` · private · write
466
-
467
- Modify Order
468
-
469
- Optional:
470
-
471
- | Param | Type | Enum | Description |
472
- |-------|------|------|-------------|
473
- | `orderId` | string | | Order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
474
- | `clientOid` | string | | Client order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
475
- | `qty` | string | | Order quantity Base coin Either qty or price must be provided |
476
- | `price` | string | | Order price Either qty or price must be provided |
477
- | `autoCancel` | string | `yes` \| `no` | Will the original order be canceled if the order modification fails yes: Cancel no: Not cancel(default) |
478
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
479
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
480
-
481
- ```bash
482
- bgc order --action modify
483
- ```
484
-
485
- #### `bgc order --action cancelAll` — **[DANGER] requires `--confirm`**
486
-
487
- `POST /api/v3/trade/cancel-symbol-order` · private · write
488
-
489
- Cancel All Orders
490
-
491
- Required:
492
-
493
- | Param | Type | Enum | Description |
494
- |-------|------|------|-------------|
495
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
496
-
497
- Optional:
498
-
499
- | Param | Type | Enum | Description |
500
- |-------|------|------|-------------|
501
- | `symbol` | string | | Symbol name e.g.,BTCUSDT If no symbol is provided, all pending orders in the corresponding category will be closed. |
502
-
503
- ```bash
504
- bgc order --action cancelAll --category <category>
505
- ```
506
-
507
- #### `bgc order --action countdownCancel`
508
-
509
- `POST /api/v3/trade/countdown-cancel-all` · private · write
510
-
511
- CountDown Cancel All
512
-
513
- Required:
514
-
515
- | Param | Type | Enum | Description |
516
- |-------|------|------|-------------|
517
- | `countdown` | string | | Reconnect Window - Unit: seconds - Positive integer, range: [5, 60]. The minimum countdown is 5 second, and the maximum is 60 seconds. Filling in 0 cancels the countdown order cancellation function. |
518
-
519
- ```bash
520
- bgc order --action countdownCancel --countdown <countdown>
521
- ```
522
-
523
- #### `bgc order --action open`
524
-
525
- `GET /api/v3/trade/unfilled-orders` · private
526
-
527
- Get Open Orders
528
-
529
- Optional:
530
-
531
- | Param | Type | Enum | Description |
532
- |-------|------|------|-------------|
533
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
534
- | `symbol` | string | | Symbol name e.g.,BTCUSDT \| |
535
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 |
536
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383085 |
537
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
538
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
539
-
540
- ```bash
541
- bgc order --action open
542
- ```
543
-
544
- #### `bgc order --action detail`
545
-
546
- `GET /api/v3/trade/order-info` · private
547
-
548
- Get Order Details
549
-
550
- Optional:
551
-
552
- | Param | Type | Enum | Description |
553
- |-------|------|------|-------------|
554
- | `orderId` | string | | Order ID Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
555
- | `clientOid` | string | | Client order ID Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
556
-
557
- ```bash
558
- bgc order --action detail
559
- ```
560
-
561
- #### `bgc order --action history`
562
-
563
- `GET /api/v3/trade/history-orders` · private
564
-
565
- Get Order History
566
-
567
- Required:
568
-
569
- | Param | Type | Enum | Description |
570
- |-------|------|------|-------------|
571
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
572
-
573
- Optional:
574
-
575
- | Param | Type | Enum | Description |
576
- |-------|------|------|-------------|
577
- | `symbol` | string | | Symbol name e.g.,BTCUSDT \| |
578
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 The access window is 90 days |
579
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 30 days |
580
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
581
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
582
-
583
- ```bash
584
- bgc order --action history --category <category>
585
- ```
586
-
587
- #### `bgc order --action fills`
588
-
589
- `GET /api/v3/trade/fills` · private
590
-
591
- Get Fill History
592
-
593
- Optional:
594
-
595
- | Param | Type | Enum | Description |
596
- |-------|------|------|-------------|
597
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
598
- | `orderId` | string | | Order ID |
599
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 The access window is 90 days. |
600
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 30 days. |
601
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
602
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
603
-
604
- ```bash
605
- bgc order --action fills
606
- ```
607
-
608
- #### `bgc order --action maxOpen`
609
-
610
- `POST /api/v3/account/max-open-available` · private
611
-
612
- Get Max Open Available
613
-
614
- Required:
615
-
616
- | Param | Type | Enum | Description |
617
- |-------|------|------|-------------|
618
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
619
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
620
- | `orderType` | string | `limit` \| `market` | Order type limit/market |
621
- | `side` | string | `buy` \| `sell` | Transaction direction buy/sell |
622
-
623
- Optional:
624
-
625
- | Param | Type | Enum | Description |
626
- |-------|------|------|-------------|
627
- | `price` | string | | Order price This field is required when orderType is limit |
628
- | `size` | string | | Order quantity, base coin |
629
-
630
- ```bash
631
- bgc order --action maxOpen --category <category> --symbol <symbol> --orderType <orderType> --side <side>
632
- ```
633
-
634
- ### `position`
635
-
636
- risk: **write** · write: no · auth: private
637
-
638
- [VERB] Positions by intent: info (current) \| history \| adlRank \| close (ONE position by symbol, at market) \| closeAll (every position in a category). close & closeAll are destructive and require confirm; reads are n…
639
-
640
- **Actions:** `info`, `history`, `adlRank`, `close`, `closeAll`
641
-
642
- #### `bgc position --action info`
643
-
644
- `GET /api/v3/position/current-position` · private
645
-
646
- Get Position Info
647
-
648
- Required:
649
-
650
- | Param | Type | Enum | Description |
651
- |-------|------|------|-------------|
652
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
653
-
654
- Optional:
655
-
656
- | Param | Type | Enum | Description |
657
- |-------|------|------|-------------|
658
- | `symbol` | string | | Symbol name e.g.BTCUSDT If no symbol is provided, all positions in the corresponding category will be returned. |
659
- | `posSide` | string | `long` \| `short` | Position side long/short If this field is provided, only the position in the corresponding side will be returned. |
660
-
661
- ```bash
662
- bgc position --action info --category <category>
663
- ```
664
-
665
- #### `bgc position --action history`
666
-
667
- `GET /api/v3/position/history-position` · private
668
-
669
- Get Positions History
670
-
671
- Required:
672
-
673
- | Param | Type | Enum | Description |
674
- |-------|------|------|-------------|
675
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
676
-
677
- Optional:
678
-
679
- | Param | Type | Enum | Description |
680
- |-------|------|------|-------------|
681
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
682
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 The access window is 90 days |
683
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 30 days |
684
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
685
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
686
-
687
- ```bash
688
- bgc position --action history --category <category>
689
- ```
690
-
691
- #### `bgc position --action adlRank`
692
-
693
- `GET /api/v3/position/adlRank` · private
694
-
695
- Get Position ADL Rank
696
-
697
- _No business parameters._
698
-
699
- ```bash
700
- bgc position --action adlRank
701
- ```
702
-
703
- #### `bgc position --action close` — **[DANGER] requires `--confirm`**
704
-
705
- `POST /api/v3/trade/close-positions` · private · write
706
-
707
- Close All Positions
708
-
709
- Required:
710
-
711
- | Param | Type | Enum | Description |
712
- |-------|------|------|-------------|
713
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
714
- | `symbol` | string | | Symbol name e.g.,BTCUSDT If no symbol is provided, all positions in the corresponding category will be closed. |
715
-
716
- Optional:
717
-
718
- | Param | Type | Enum | Description |
719
- |-------|------|------|-------------|
720
- | `posSide` | string | `long` \| `short` | Position side long/short If this field is provided, only the position in the corresponding side will be closed. |
721
-
722
- ```bash
723
- bgc position --action close --category <category> --symbol <symbol>
724
- ```
725
-
726
- #### `bgc position --action closeAll` — **[DANGER] requires `--confirm`**
727
-
728
- `POST /api/v3/trade/close-positions` · private · write
729
-
730
- Close All Positions
731
-
732
- Required:
733
-
734
- | Param | Type | Enum | Description |
735
- |-------|------|------|-------------|
736
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
737
-
738
- Optional:
739
-
740
- | Param | Type | Enum | Description |
741
- |-------|------|------|-------------|
742
- | `symbol` | string | | Symbol name e.g.,BTCUSDT If no symbol is provided, all positions in the corresponding category will be closed. |
743
- | `posSide` | string | `long` \| `short` | Position side long/short If this field is provided, only the position in the corresponding side will be closed. |
744
-
745
- ```bash
746
- bgc position --action closeAll --category <category>
747
- ```
748
-
749
- ### `strategy_order`
750
-
751
- risk: **write** · write: no · auth: private
752
-
753
- [VERB] Strategy (trigger/plan) orders by intent: place \| cancel \| modify \| open (unfilled) \| history. Writes honor dryRun/confirm/readOnly.
754
-
755
- **Actions:** `place`, `cancel`, `modify`, `open`, `history`
756
-
757
- #### `bgc strategy_order --action place`
758
-
759
- `POST /api/v3/trade/place-strategy-order` · private · write
760
-
761
- Place Strategy Order
762
-
763
- Required:
764
-
765
- | Param | Type | Enum | Description |
766
- |-------|------|------|-------------|
767
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
768
- | `symbol` | string | | Symbol name e.g.,BTCUSDT |
769
- | `qty` | string | | Order Quantity This is a required field when tpslMode=partial, and the unit is in the base coin |
770
- | `posSide` | string | `long` \| `short` | Position side long/short |
771
-
772
- Optional:
773
-
774
- | Param | Type | Enum | Description |
775
- |-------|------|------|-------------|
776
- | `clientOid` | string | | Client order ID The idempotent validity period is six hours (not fully guaranteed) |
777
- | `type` | string | `tpsl` | Strategy Type tpslTake-Profit and Stop-Loss Default:tpsl |
778
- | `tpslMode` | string | `full` \| `partial` | Take-Profit and Stop-Loss Mode fullAll Positions Take-Profit and Stop-Loss partialPartial Position Take-Profit and Stop-Loss If left blank, the default value is full |
779
- | `tpTriggerBy` | string | `market` \| `mark` | Take-Profit Trigger Type market: Market Price mark: Mark Price If not specified, the default value is market price |
780
- | `slTriggerBy` | string | `market` \| `mark` | Stop-Loss Trigger Type market: Market Price mark: Mark Price If not filled in, the default value is market price |
781
- | `takeProfit` | string | | Take-Profit Trigger Price |
782
- | `stopLoss` | string | | Stop-Loss Trigger Price |
783
- | `tpOrderType` | string | `limit` \| `market` | Take-Profit Trigger Strategy Order Type limit: Limit Order market: Market Order If not filled in, the default value is market price |
784
- | `slOrderType` | string | `limit` \| `market` | Stop-Loss Trigger Strategy Order Type limit: Limit Order market: Market Order If not filled in, the default value is market price |
785
- | `tpLimitPrice` | string | | Take-Profit Strategy Order Execution Price This field is only valid for limit orders (when tpOrderType=limit); it is ignored for market orders. |
786
- | `slLimitPrice` | string | | Stop-Loss Strategy Order Execution Price This field is only valid for limit orders (when slOrderType=limit); it is ignored for market orders |
787
-
788
- ```bash
789
- bgc strategy_order --action place --category <category> --symbol <symbol> --qty <qty> --posSide <posSide>
790
- ```
791
-
792
- #### `bgc strategy_order --action cancel`
793
-
794
- `POST /api/v3/trade/cancel-strategy-order` · private · write
795
-
796
- Cancel Strategy Order
797
-
798
- Required:
799
-
800
- | Param | Type | Enum | Description |
801
- |-------|------|------|-------------|
802
- | `orderId` | string | | Order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
803
-
804
- Optional:
805
-
806
- | Param | Type | Enum | Description |
807
- |-------|------|------|-------------|
808
- | `clientOid` | string | | Client order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
809
-
810
- ```bash
811
- bgc strategy_order --action cancel --orderId <orderId>
812
- ```
813
-
814
- #### `bgc strategy_order --action modify`
815
-
816
- `POST /api/v3/trade/modify-strategy-order` · private · write
817
-
818
- Modify Strategy Order
819
-
820
- Required:
821
-
822
- | Param | Type | Enum | Description |
823
- |-------|------|------|-------------|
824
- | `orderId` | string | | Order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
825
- | `qty` | string | | Order Quantity Can be modified under partial take-profit/stop-loss mode, and the unit is in the base coin |
826
-
827
- Optional:
828
-
829
- | Param | Type | Enum | Description |
830
- |-------|------|------|-------------|
831
- | `clientOid` | string | | Client order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
832
- | `tpTriggerBy` | string | `market` \| `mark` | Take-Profit Trigger Type market: Market Price mark: Mark Price |
833
- | `slTriggerBy` | string | `market` \| `mark` | Stop-Loss Trigger Type market: Market Price mark: Mark Price |
834
- | `takeProfit` | string | | Take-Profit Trigger Price |
835
- | `stopLoss` | string | | Stop-Loss Trigger Price |
836
- | `tpOrderType` | string | `limit` \| `market` | Take-Profit Trigger Strategy Order Type limit: Limit Order market: Market Order |
837
- | `slOrderType` | string | `limit` \| `market` | Stop-Loss Trigger Strategy Order Type limit: Limit Order market: Market Order |
838
- | `tpLimitPrice` | string | | Take-Profit Strategy Order Execution Price This field is only valid for limit orders (when tpOrderType=limit); it is ignored for market orders. |
839
- | `slLimitPrice` | string | | Stop-Loss Strategy Order Execution Price This field is only valid for limit orders (when slOrderType=limit); it is ignored for market orders |
840
-
841
- ```bash
842
- bgc strategy_order --action modify --orderId <orderId> --qty <qty>
843
- ```
844
-
845
- #### `bgc strategy_order --action open`
846
-
847
- `GET /api/v3/trade/unfilled-strategy-orders` · private
848
-
849
- Unfilled Strategy Orders
850
-
851
- Required:
852
-
853
- | Param | Type | Enum | Description |
854
- |-------|------|------|-------------|
855
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
856
-
857
- Optional:
858
-
859
- | Param | Type | Enum | Description |
860
- |-------|------|------|-------------|
861
- | `type` | string | `tpsl` | Strategy Type tpslTake-Profit and Stop-Loss |
862
-
863
- ```bash
864
- bgc strategy_order --action open --category <category>
865
- ```
866
-
867
- #### `bgc strategy_order --action history`
868
-
869
- `GET /api/v3/trade/history-strategy-orders` · private
870
-
871
- History Strategy Orders
872
-
873
- Required:
874
-
875
- | Param | Type | Enum | Description |
876
- |-------|------|------|-------------|
877
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
878
-
879
- Optional:
880
-
881
- | Param | Type | Enum | Description |
882
- |-------|------|------|-------------|
883
- | `type` | string | `tpsl` | Strategy Type tpslTake-Profit and Stop-Loss |
884
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 |
885
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383085 |
886
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
887
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
888
-
889
- ```bash
890
- bgc strategy_order --action history --category <category>
891
- ```
892
-
893
- ## Domain: account
894
-
895
- ### `account_overview`
896
-
897
- risk: **read** · write: no · auth: private
898
-
899
- [VERB] One-call account snapshot: fans out to assets, settings, funding assets, and (with category/symbol) positions and fee rate. Each section reports ok/error independently.
900
-
901
- Optional:
902
-
903
- | Param | Type | Enum | Description |
904
- |-------|------|------|-------------|
905
- | `coin` | string | | Optional coin filter for funding assets. |
906
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | If provided, also fetches current positions (and fee rate when symbol is given too). |
907
- | `symbol` | string | | With category, also fetches the fee rate for this symbol. |
908
- | `view` | string | `summary` \| `full` | summary (default) trims null fields to save tokens; full returns the untouched payload. |
909
- | `fields` | any | | Optional list (array or comma-separated string) of fields to keep on each returned row. |
910
-
911
- ```bash
912
- bgc account_overview
913
- ```
914
-
915
- ### `account_config`
916
-
917
- risk: **write** · write: no · auth: private
918
-
919
- [VERB] Account settings by intent: set account mode (basic/advanced), position holding mode (one-way/hedge), and leverage; switch account & fee-deduction; plus oiLimit / paymentCoins / switchStatus / deductInfo reads. (…
920
-
921
- **Actions:** `setAccountMode`, `setHoldingMode`, `setLeverage`, `switchAccount`, `switchDeduct`, `switchStatus`, `deductInfo`, `oiLimit`, `paymentCoins`
922
-
923
- #### `bgc account_config --action setAccountMode`
924
-
925
- `POST /api/v3/account/adjust-account-mode` · private · write
926
-
927
- Adjust Account Mode
928
-
929
- Required:
930
-
931
- | Param | Type | Enum | Description |
932
- |-------|------|------|-------------|
933
- | `mode` | string | `basic` \| `advanced` | Account mode basic Basic mode advanced Advanced mode |
934
-
935
- Optional:
936
-
937
- | Param | Type | Enum | Description |
938
- |-------|------|------|-------------|
939
- | `targetUid` | string | | Target account UID. If not provided, it defaults to the currently operated account. If a sub-account UID is provided, it indicates the master account is operating on the sub-account. |
940
-
941
- ```bash
942
- bgc account_config --action setAccountMode --mode <mode>
943
- ```
944
-
945
- #### `bgc account_config --action setHoldingMode`
946
-
947
- `POST /api/v3/account/set-hold-mode` · private · write
948
-
949
- Set Holding Mode
950
-
951
- Required:
952
-
953
- | Param | Type | Enum | Description |
954
- |-------|------|------|-------------|
955
- | `holdMode` | string | `one_way_mode` \| `hedge_mode` | Holding mode one_way_mode This mode allows holding positions in a single direction, either long or short, but not both at the same time hedge_mode This mode allows holding both long and short positions simultaneously |
956
-
957
- ```bash
958
- bgc account_config --action setHoldingMode --holdMode <holdMode>
959
- ```
960
-
961
- #### `bgc account_config --action setLeverage`
962
-
963
- `POST /api/v3/account/set-leverage` · private · write
964
-
965
- Set Leverage
966
-
967
- Required:
968
-
969
- | Param | Type | Enum | Description |
970
- |-------|------|------|-------------|
971
- | `category` | string | `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURESCoin-M futures USDC-FUTURES USDC futures |
972
- | `leverage` | string | | Leverage multiple |
973
-
974
- Optional:
975
-
976
- | Param | Type | Enum | Description |
977
- |-------|------|------|-------------|
978
- | `symbol` | string | | Symbol name This field is required to set leverage for futures |
979
- | `coin` | string | | Coin name This field is required to set leverage for margin trading |
980
- | `posSide` | string | `long` \| `short` | Position side long/short This field is required to set leverage for isolated margin |
981
-
982
- ```bash
983
- bgc account_config --action setLeverage --category <category> --leverage <leverage>
984
- ```
985
-
986
- #### `bgc account_config --action switchAccount`
987
-
988
- `POST /api/v3/account/switch` · private · write
989
-
990
- Switch Account
991
-
992
- _No business parameters._
993
-
994
- ```bash
995
- bgc account_config --action switchAccount
996
- ```
997
-
998
- #### `bgc account_config --action switchDeduct`
999
-
1000
- `POST /api/v3/account/switch-deduct` · private · write
1001
-
1002
- Switch Deduct
1003
-
1004
- Required:
1005
-
1006
- | Param | Type | Enum | Description |
1007
- |-------|------|------|-------------|
1008
- | `deduct` | string | `on` \| `off` | Is it enabled on enabled off disabled |
1009
-
1010
- ```bash
1011
- bgc account_config --action switchDeduct --deduct <deduct>
1012
- ```
1013
-
1014
- #### `bgc account_config --action switchStatus`
1015
-
1016
- `GET /api/v3/account/switch-status` · private
1017
-
1018
- Get Switch Status
1019
-
1020
- _No business parameters._
1021
-
1022
- ```bash
1023
- bgc account_config --action switchStatus
1024
- ```
1025
-
1026
- #### `bgc account_config --action deductInfo`
1027
-
1028
- `GET /api/v3/account/deduct-info` · private
1029
-
1030
- Get Deduct Info
1031
-
1032
- _No business parameters._
1033
-
1034
- ```bash
1035
- bgc account_config --action deductInfo
1036
- ```
1037
-
1038
- #### `bgc account_config --action oiLimit`
1039
-
1040
- `GET /api/v3/account/open-interest-limit` · private
1041
-
1042
- Get OI Limit
1043
-
1044
- Required:
1045
-
1046
- | Param | Type | Enum | Description |
1047
- |-------|------|------|-------------|
1048
- | `symbol` | string | | Symbol e.g.,BTCUSDT |
1049
- | `category` | string | `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` | Product type USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
1050
-
1051
- ```bash
1052
- bgc account_config --action oiLimit --symbol <symbol> --category <category>
1053
- ```
1054
-
1055
- #### `bgc account_config --action paymentCoins`
1056
-
1057
- `GET /api/v3/account/payment-coins` · private
1058
-
1059
- Get Payment Coins
1060
-
1061
- _No business parameters._
1062
-
1063
- ```bash
1064
- bgc account_config --action paymentCoins
1065
- ```
1066
-
1067
- ### `repayment`
1068
-
1069
- risk: **write** · write: no · auth: private
1070
-
1071
- [VERB] Repay account liabilities: submit a repayment, or list repayable coins/amounts.
1072
-
1073
- **Actions:** `submit`, `repayable`
1074
-
1075
- #### `bgc repayment --action submit`
1076
-
1077
- `POST /api/v3/account/repay` · private · write
1078
-
1079
- Repay
1080
-
1081
- Required:
1082
-
1083
- | Param | Type | Enum | Description |
1084
- |-------|------|------|-------------|
1085
- | `repayableCoinList` | array | | Repayable coin list |
1086
- | `paymentCoinList` | array | | Payment coin list |
1087
-
1088
- ```bash
1089
- bgc repayment --action submit --repayableCoinList <repayableCoinList> --paymentCoinList <paymentCoinList>
1090
- ```
1091
-
1092
- #### `bgc repayment --action repayable`
1093
-
1094
- `GET /api/v3/account/repayable-coins` · private
1095
-
1096
- Get Repayable Coins
1097
-
1098
- _No business parameters._
1099
-
1100
- ```bash
1101
- bgc repayment --action repayable
1102
- ```
1103
-
1104
- ## Domain: funds
1105
-
1106
- ### `transfer_funds`
1107
-
1108
- risk: **write** · write: no · auth: private
1109
-
1110
- [VERB] Move funds by intent: action internal \| mainToSub \| subToMain. preflight reports max transferable without moving anything; transfers honor dryRun/readOnly.
1111
-
1112
- **Actions:** `internal`, `mainToSub`, `subToMain`
1113
-
1114
- #### `bgc transfer_funds --action internal`
1115
-
1116
- `POST /api/v3/account/transfer` · private · write
1117
-
1118
- Transfer
1119
-
1120
- Required:
1121
-
1122
- | Param | Type | Enum | Description |
1123
- |-------|------|------|-------------|
1124
- | `fromType` | string | `spot` \| `p2p` \| `coin_futures` \| `usdt_futures` \| `usdc_futures` \| `crossed_margin` \| `isolated_margin` \| `uta` | From (source) account type spot Spot account/Funding Account p2p P2P account/OTC account coin_futures Coin-M futures account usdt_futures USDT futures account usdc_futures USDC futures account crossed_margin Cross margi… |
1125
- | `toType` | string | `spot` \| `p2p` \| `coin_futures` \| `usdt_futures` \| `usdc_futures` \| `crossed_margin` \| `isolated_margin` \| `uta` | To (target) account type spot Spot account/Funding Account p2p P2P account/OTC account coin_futures Coin-M futures account usdt_futures USDT futures account usdc_futures USDC futures account crossed_margin Cross margin … |
1126
- | `amount` | string | | transfer amount |
1127
- | `coin` | string | | transfer coin e.g: BTC |
1128
-
1129
- Optional:
1130
-
1131
- | Param | Type | Enum | Description |
1132
- |-------|------|------|-------------|
1133
- | `symbol` | string | | Isolated spot margin e.g: BTCUSDT |
1134
- | `allowBorrow` | string | | Body field allowBorrow. |
1135
-
1136
- ```bash
1137
- bgc transfer_funds --action internal --fromType <fromType> --toType <toType> --amount <amount> --coin <coin>
1138
- ```
1139
-
1140
- #### `bgc transfer_funds --action mainToSub`
1141
-
1142
- `POST /api/v3/account/sub-transfer` · private · write
1143
-
1144
- Main-Sub Account Transfer
1145
-
1146
- Required:
1147
-
1148
- | Param | Type | Enum | Description |
1149
- |-------|------|------|-------------|
1150
- | `fromType` | string | `spot` \| `p2p` \| `usdt_futures` \| `coin_futures` \| `usdc_futures` \| `crossed_margin` \| `uta` | Transferring Account Type spot Spot account/Funding account p2p P2P account/OTC account usdt_futures USDT-Margined Futures Account coin_futures Coin-Margined Futures Account usdc_futures USDC Futures Account crossed_mar… |
1151
- | `toType` | string | `spot` \| `p2p` \| `usdt_futures` \| `coin_futures` \| `usdc_futures` \| `crossed_margin` \| `uta` | Receiving Account Type spot Spot account/Funding account p2p P2P account/OTC account usdt_futures USDT-Margined Futures Account coin_futures Coin-Margined Futures Account usdc_futures USDC Futures Account crossed_margin… |
1152
- | `amount` | string | | Amount to Transfer In |
1153
- | `coin` | string | | Transfer Currency, e.g., BTC |
1154
- | `fromUserId` | string | | Transferring Account UID |
1155
- | `toUserId` | string | | Receiving Account UID |
1156
- | `clientOid` | string | | clientOid,Cannot exceed 64 characters. |
1157
-
1158
- Optional:
1159
-
1160
- | Param | Type | Enum | Description |
1161
- |-------|------|------|-------------|
1162
- | `allowBorrow` | string | | Body field allowBorrow. |
1163
-
1164
- ```bash
1165
- bgc transfer_funds --action mainToSub --fromType <fromType> --toType <toType> --amount <amount> --coin <coin> --fromUserId <fromUserId> --toUserId <toUserId> --clientOid <clientOid>
1166
- ```
1167
-
1168
- #### `bgc transfer_funds --action subToMain`
1169
-
1170
- `POST /api/v3/account/sub-master-transfer` · private · write
1171
-
1172
- Sub-Main Account Transfer
1173
-
1174
- Required:
1175
-
1176
- | Param | Type | Enum | Description |
1177
- |-------|------|------|-------------|
1178
- | `fromType` | string | `spot` \| `uta` | Transferring Account Type spot Funding account uta Unified Account |
1179
- | `toType` | string | `spot` \| `p2p` \| `uta` | Receiving Account Type spot Funding account p2p OTC account uta Unified Account |
1180
- | `amount` | string | | Amount to Transfer In |
1181
- | `coin` | string | | Transfer Currency, e.g., BTC |
1182
-
1183
- Optional:
1184
-
1185
- | Param | Type | Enum | Description |
1186
- |-------|------|------|-------------|
1187
- | `clientOid` | string | | clientOid,Cannot exceed 64 characters. |
1188
-
1189
- ```bash
1190
- bgc transfer_funds --action subToMain --fromType <fromType> --toType <toType> --amount <amount> --coin <coin>
1191
- ```
1192
-
1193
- ### `deposit`
1194
-
1195
- risk: **write** · write: no · auth: private
1196
-
1197
- [VERB] Deposits by intent: address (get a deposit address) \| records (deposit history) \| setupAccount.
1198
-
1199
- **Actions:** `address`, `records`, `setupAccount`
1200
-
1201
- #### `bgc deposit --action address`
1202
-
1203
- `GET /api/v3/account/deposit-address` · private
1204
-
1205
- Get Deposit Address
1206
-
1207
- Required:
1208
-
1209
- | Param | Type | Enum | Description |
1210
- |-------|------|------|-------------|
1211
- | `coin` | string | | Coin name - The currency name can be obtained using the Get Currency Information API. |
1212
-
1213
- Optional:
1214
-
1215
- | Param | Type | Enum | Description |
1216
- |-------|------|------|-------------|
1217
- | `chain` | string | | Chain Name - The chain name can be obtained using the Get Currency Information API. - If not filled, the system will automatically match a chain to generate a deposit address |
1218
- | `size` | string | | Deposit Quantity - Only applies to BTC Lightning Network - Limit range: 0.000001 - 0.01. |
1219
-
1220
- ```bash
1221
- bgc deposit --action address --coin <coin>
1222
- ```
1223
-
1224
- #### `bgc deposit --action records`
1225
-
1226
- `GET /api/v3/account/deposit-records` · private
1227
-
1228
- Get Deposit Records
1229
-
1230
- Required:
1231
-
1232
- | Param | Type | Enum | Description |
1233
- |-------|------|------|-------------|
1234
- | `startTime` | string | | Query record start time<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li></ul> |
1235
- | `endTime` | string | | Query record end time<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li></ul> |
1236
-
1237
- Optional:
1238
-
1239
- | Param | Type | Enum | Description |
1240
- |-------|------|------|-------------|
1241
- | `coin` | string | | Coin name - If left blank, all currency deposit records will be retrieved. |
1242
- | `limit` | string | | Items per page The default value is 20, and the maximum value is 100. |
1243
- | `cursor` | string | | Cursor ID - Used for pagination to reduce query response time - Do not send for the initial query. When querying the second page and subsequent data, use the smallest orderId returned from the previous query. The result… |
1244
- | `orderId` | string | | Order ID - Used for specifying order queries. |
1245
-
1246
- ```bash
1247
- bgc deposit --action records --startTime <startTime> --endTime <endTime>
1248
- ```
1249
-
1250
- #### `bgc deposit --action setupAccount`
1251
-
1252
- `POST /api/v3/account/deposit-account` · private · write
1253
-
1254
- Set Up Deposit Account
1255
-
1256
- Required:
1257
-
1258
- | Param | Type | Enum | Description |
1259
- |-------|------|------|-------------|
1260
- | `coin` | string | | Recharge coin 如BTC |
1261
- | `accountType` | string | `funding` \| `unified` \| `otc` | Account type funding Funding account unified Unified account otc OTC account The current default is the funding account, and it can be modified to a unified account or an OTC account |
1262
-
1263
- ```bash
1264
- bgc deposit --action setupAccount --coin <coin> --accountType <accountType>
1265
- ```
1266
-
1267
- ### `withdraw`
1268
-
1269
- risk: **write** · write: no · auth: private
1270
-
1271
- [VERB] Withdrawals by intent: submit (send funds out — irreversible, needs confirm) \| records (withdrawal history).
1272
-
1273
- **Actions:** `submit`, `records`
1274
-
1275
- #### `bgc withdraw --action submit` — **[DANGER] requires `--confirm`**
1276
-
1277
- `POST /api/v3/account/withdrawal` · private · write
1278
-
1279
- Withdrawal
1280
-
1281
- Required:
1282
-
1283
- | Param | Type | Enum | Description |
1284
- |-------|------|------|-------------|
1285
- | `coin` | string | | Coin name |
1286
- | `transferType` | string | `on_chain` \| `internal_transfer` | Withdrawal Type on_chainOn-chain deposit internal_transferInternal transfer |
1287
- | `address` | string | | Withdrawal Address - When transferType is on_chain, fill in the chain address. - When transferType is internal_transfer, fill in the UID, email, or mobile number based on innerToType. |
1288
- | `size` | string | | Withdrawal Quantity Special Notes for Bitcoin Lightning Network Withdrawals: This parameter must exactly match the amount on the Bitcoin Lightning Network deposit invoice; The withdrawal quantity for Bitcoin Lightning N… |
1289
-
1290
- Optional:
1291
-
1292
- | Param | Type | Enum | Description |
1293
- |-------|------|------|-------------|
1294
- | `chain` | string | | Blockchain Network - For example, erc20, trc20, etc. - This parameter is required when transferType=on_chain - The chain name can be obtained using the Get Currency Information API. |
1295
- | `innerToType` | string | `uid` \| `email` \| `mobile` | Internal Withdrawal Address Type uidUser ID email Email mobile Mobile phone number - If not filled, the default value is uid |
1296
- | `areaCode` | string | | Area Code This parameter is required when innerToType = mobile |
1297
- | `tag` | string | | Address Tag This is required for withdrawals of certain cryptocurrencies, like EOS. |
1298
- | `remark` | string | | Remark |
1299
- | `clientOid` | string | | Client Order ID |
1300
- | `memberCode` | string | | Member Code bithumb korbit coinone |
1301
- | `identityType` | string | `company` \| `user` | Identity Type companyInstitutional Company user Individual User |
1302
- | `companyName` | string | | Company Name Fill in this parameter when identity=company |
1303
- | `firstName` | string | | First Name Fill in this parameter when identity=user |
1304
- | `lastName` | string | | Last Name Fill in this parameter when identity=user |
1305
-
1306
- ```bash
1307
- bgc withdraw --action submit --coin <coin> --transferType <transferType> --address <address> --size <size>
1308
- ```
1309
-
1310
- #### `bgc withdraw --action records`
1311
-
1312
- `GET /api/v3/account/withdrawal-records` · private
1313
-
1314
- Get Withdrawal Records
1315
-
1316
- Required:
1317
-
1318
- | Param | Type | Enum | Description |
1319
- |-------|------|------|-------------|
1320
- | `startTime` | string | | Query record start time<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li></ul> |
1321
- | `endTime` | string | | Query record end time<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li></ul> |
1322
-
1323
- Optional:
1324
-
1325
- | Param | Type | Enum | Description |
1326
- |-------|------|------|-------------|
1327
- | `coin` | string | | Coin name - If not filled in, all coin deposit records will be retrieved. |
1328
- | `orderId` | string | | order ID - Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
1329
- | `clientOid` | string | | Client Order ID - Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
1330
- | `limit` | string | | Items per page The default value is 20, and the maximum value is 100. |
1331
- | `cursor` | string | | Cursor ID - Used for pagination to reduce query response time - Do not send for the initial query. When querying the second page and subsequent data, use the smallest orderId returned from the previous query. The result… |
1332
-
1333
- ```bash
1334
- bgc withdraw --action records --startTime <startTime> --endTime <endTime>
1335
- ```
1336
-
1337
- ### `funds_records`
1338
-
1339
- risk: **read** · write: no · auth: private
1340
-
1341
- [VERB] Funds history (read-only): financial ledger \| convert records \| main↔sub transfer records \| transferableCoins.
1342
-
1343
- **Actions:** `financial`, `convert`, `subTransfers`, `transferableCoins`
1344
-
1345
- #### `bgc funds_records --action financial`
1346
-
1347
- `GET /api/v3/account/financial-records` · private
1348
-
1349
- Get Financial Records
1350
-
1351
- Required:
1352
-
1353
- | Param | Type | Enum | Description |
1354
- |-------|------|------|-------------|
1355
- | `category` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` \| `OTHER` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures OTHER Other |
1356
-
1357
- Optional:
1358
-
1359
- | Param | Type | Enum | Description |
1360
- |-------|------|------|-------------|
1361
- | `coin` | string | | Coin name e.g.,BTC |
1362
- | `type` | string | `TRANSFER_IN` \| `TRANSFER_OUT` | Type TRANSFER_IN/TRANSFER_OUT...... All enumeration values can be viewed under the Enumeration category. |
1363
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 The access window is 90 days |
1364
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 30 days |
1365
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
1366
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
1367
-
1368
- ```bash
1369
- bgc funds_records --action financial --category <category>
1370
- ```
1371
-
1372
- #### `bgc funds_records --action convert`
1373
-
1374
- `GET /api/v3/account/convert-records` · private
1375
-
1376
- Get Convert Records
1377
-
1378
- Required:
1379
-
1380
- | Param | Type | Enum | Description |
1381
- |-------|------|------|-------------|
1382
- | `fromCoin` | string | | From coin (source coin) It refers to the coin being converted |
1383
- | `toCoin` | string | | To coin (target coin) It refers to the coin being converted into (received) |
1384
-
1385
- Optional:
1386
-
1387
- | Param | Type | Enum | Description |
1388
- |-------|------|------|-------------|
1389
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 The access window is 90 days |
1390
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 30 days |
1391
- | `limit` | string | | Limit per page Default:100. Maximum:100 |
1392
- | `cursor` | string | | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages |
1393
-
1394
- ```bash
1395
- bgc funds_records --action convert --fromCoin <fromCoin> --toCoin <toCoin>
1396
- ```
1397
-
1398
- #### `bgc funds_records --action subTransfers`
1399
-
1400
- `GET /api/v3/account/sub-transfer-record` · private
1401
-
1402
- Get the transfer records of Main-Sub account
1403
-
1404
- Optional:
1405
-
1406
- | Param | Type | Enum | Description |
1407
- |-------|------|------|-------------|
1408
- | `subUid` | string | | Sub-account UID. If not provided, transfer records of the main account will be retrieved. |
1409
- | `role` | string | `initiator` \| `receiver` | Transfer-out account type initiator Initiator of the transfer receiver Recipient of the transfer Default: initiator |
1410
- | `coin` | string | | Coin name |
1411
- | `startTime` | string | | Start time for querying transfer records<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li><li>The time interval between startTime and endTime should not exceed 90 days.</li></ul> |
1412
- | `endTime` | string | | End time for querying transfer records<ul><li>Unix millisecond timestamp, e.g., 1690196141868</li><li>The time interval between startTime and endTime should not exceed 90 days.</li></ul> |
1413
- | `clientOid` | string | | clientOid,Cannot exceed 64 characters. |
1414
- | `limit` | string | | Items per page The default value is 100, and the maximum value is 100. |
1415
- | `cursor` | string | | Cursor ID Used for pagination. Do not pass it for the first query. For subsequent queries (second page and beyond), use the cursor returned from the previous query. |
1416
-
1417
- ```bash
1418
- bgc funds_records --action subTransfers
1419
- ```
1420
-
1421
- #### `bgc funds_records --action transferableCoins`
1422
-
1423
- `GET /api/v3/account/transferable-coins` · private
1424
-
1425
- Get Transferable Coins
1426
-
1427
- Required:
1428
-
1429
- | Param | Type | Enum | Description |
1430
- |-------|------|------|-------------|
1431
- | `fromType` | string | `spot` \| `p2p` \| `coin_futures` \| `usdt_futures` \| `usdc_futures` \| `crossed_margin` \| `isolated_margin` \| `uta` | From (source) account type spot Spot account/Funding account p2p P2P account/OTC account coin_futures Coin-M futures account usdt_futures USDT futures account usdc_futures USDC futures account crossed_margin Cross margi… |
1432
- | `toType` | string | `spot` \| `p2p` \| `coin_futures` \| `usdt_futures` \| `usdc_futures` \| `crossed_margin` \| `isolated_margin` \| `uta` | To (target) account type spot Spot account/Funding account p2p P2P account/OTC account coin_futures Coin-M futures account usdt_futures USDT futures account usdc_futures USDC futures account crossed_margin Cross margin … |
1433
-
1434
- ```bash
1435
- bgc funds_records --action transferableCoins --fromType <fromType> --toType <toType>
1436
- ```
1437
-
1438
- ## Domain: subaccount
1439
-
1440
- ### `subaccount`
1441
-
1442
- risk: **write** · write: no · auth: private
1443
-
1444
- [VERB] Sub-accounts by intent: create \| createAgent \| list \| freeze \| assets \| API keys (apiKeys/createApiKey/modifyApiKey/deleteApiKey) \| depositAddress \| depositRecords.
1445
-
1446
- **Actions:** `create`, `createAgent`, `list`, `freeze`, `assets`, `apiKeys`, `createApiKey`, `modifyApiKey`, `deleteApiKey`, `depositAddress`, `depositRecords`
1447
-
1448
- #### `bgc subaccount --action create`
1449
-
1450
- `POST /api/v3/user/create-sub` · private · write
1451
-
1452
- Create Sub-account
1453
-
1454
- Required:
1455
-
1456
- | Param | Type | Enum | Description |
1457
- |-------|------|------|-------------|
1458
- | `username` | string | | Generate a virtual email address username. It can only contain lowercase letters and cannot exceed 20 characters. |
1459
-
1460
- Optional:
1461
-
1462
- | Param | Type | Enum | Description |
1463
- |-------|------|------|-------------|
1464
- | `accountMode` | string | `classic` \| `unified` | Sub-account Mode classic Classic Account Sub-account unified Unified Account Sub-account |
1465
- | `note` | string | | Note, cannot exceed 50 characters. |
1466
-
1467
- ```bash
1468
- bgc subaccount --action create --username <username>
1469
- ```
1470
-
1471
- #### `bgc subaccount --action createAgent`
1472
-
1473
- `POST /api/v3/user/sub-account/agent-create` · private · write
1474
-
1475
- Create Agent Sub-account
1476
-
1477
- Optional:
1478
-
1479
- | Param | Type | Enum | Description |
1480
- |-------|------|------|-------------|
1481
- | `username` | string | | Body field username. |
1482
- | `passphrase` | string | | Body field passphrase. |
1483
- | `note` | string | | Body field note. |
1484
-
1485
- ```bash
1486
- bgc subaccount --action createAgent
1487
- ```
1488
-
1489
- #### `bgc subaccount --action list`
1490
-
1491
- `GET /api/v3/user/sub-list` · private
1492
-
1493
- Get Sub-account List
1494
-
1495
- Optional:
1496
-
1497
- | Param | Type | Enum | Description |
1498
- |-------|------|------|-------------|
1499
- | `limit` | string | | Items per page The default value is 100, and the maximum value is 100. |
1500
- | `cursor` | string | | Cursor ID Used for pagination. Do not pass it for the first query. For subsequent queries (second page and beyond), use the cursor returned from the previous query. |
1501
-
1502
- ```bash
1503
- bgc subaccount --action list
1504
- ```
1505
-
1506
- #### `bgc subaccount --action freeze`
1507
-
1508
- `POST /api/v3/user/freeze-sub` · private · write
1509
-
1510
- Freeze/Unfreeze Sub-account
1511
-
1512
- Required:
1513
-
1514
- | Param | Type | Enum | Description |
1515
- |-------|------|------|-------------|
1516
- | `subUid` | string | | Sub-account ID to be frozen/unfrozen |
1517
- | `operation` | string | `freeze` \| `unfreeze` | Operation Type: freeze Freeze unfreeze Unfreeze \| |
1518
-
1519
- ```bash
1520
- bgc subaccount --action freeze --subUid <subUid> --operation <operation>
1521
- ```
1522
-
1523
- #### `bgc subaccount --action assets`
1524
-
1525
- `GET /api/v3/account/sub-unified-assets` · private
1526
-
1527
- Get SubAccount Unified Assets
1528
-
1529
- Optional:
1530
-
1531
- | Param | Type | Enum | Description |
1532
- |-------|------|------|-------------|
1533
- | `subUid` | string | | Sub-account UID Leave blank to return all sub-account asset lists |
1534
- | `cursor` | string | | Cursor ID For pagination. Omit in first request. Pass previous cursor in subsequent requests. |
1535
- | `limit` | string | | Sub-accounts per Page Default value is 10, maximum is 50. |
1536
-
1537
- ```bash
1538
- bgc subaccount --action assets
1539
- ```
1540
-
1541
- #### `bgc subaccount --action apiKeys`
1542
-
1543
- `GET /api/v3/user/sub-api-list` · private
1544
-
1545
- Get Sub-account API Keys
1546
-
1547
- Required:
1548
-
1549
- | Param | Type | Enum | Description |
1550
- |-------|------|------|-------------|
1551
- | `subUid` | string | | Sub-account UID |
1552
-
1553
- Optional:
1554
-
1555
- | Param | Type | Enum | Description |
1556
- |-------|------|------|-------------|
1557
- | `limit` | string | | Items per page The default value is 100, and the maximum value is 100. |
1558
- | `cursor` | string | | Cursor ID Used for pagination. Do not pass it for the first query. For subsequent queries (second page and beyond), use the cursor returned from the previous query. |
1559
-
1560
- ```bash
1561
- bgc subaccount --action apiKeys --subUid <subUid>
1562
- ```
1563
-
1564
- #### `bgc subaccount --action createApiKey`
1565
-
1566
- `POST /api/v3/user/create-sub-api` · private · write
1567
-
1568
- Create Sub-account API Key
1569
-
1570
- Required:
1571
-
1572
- | Param | Type | Enum | Description |
1573
- |-------|------|------|-------------|
1574
- | `subUid` | string | | Sub-account ID |
1575
- | `note` | string | | Note Name The note needs to start with a letter and supports [0-9], [a-z], [A-Z], as well as [-,_] |
1576
- | `type` | string | `read_write` \| `read_only` | Permission Type read_write Read/Write read_only Read-only |
1577
- | `passphrase` | string | | passphrase A combination of 8 to 32 characters of letters and numbers |
1578
- | `permissions` | array | | permission values <ul><li>Unified Account Permissions: uta_mgt Unified Account Management uta_trade Unified Account Trading </li></ul> |
1579
- | `ips` | array | | Withdrawal Whitelist IP Multiple IP addresses are supported A maximum of 30 IPs can be bound to a single key Only supports IPv4 |
1580
-
1581
- ```bash
1582
- bgc subaccount --action createApiKey --subUid <subUid> --note <note> --type <type> --passphrase <passphrase> --permissions <permissions> --ips <ips>
1583
- ```
1584
-
1585
- #### `bgc subaccount --action modifyApiKey`
1586
-
1587
- `POST /api/v3/user/update-sub-api` · private · write
1588
-
1589
- Modify Sub-account API Key
1590
-
1591
- Required:
1592
-
1593
- | Param | Type | Enum | Description |
1594
- |-------|------|------|-------------|
1595
- | `apikey` | string | | Sub-account API Key |
1596
- | `passphrase` | string | | passphrase A combination of 8 to 32 characters of letters and numbers |
1597
-
1598
- Optional:
1599
-
1600
- | Param | Type | Enum | Description |
1601
- |-------|------|------|-------------|
1602
- | `type` | string | `read_write` \| `read_only` | Permission Type read_write Read/Write read_only Read-only This parameter is required when permissions has a value. |
1603
- | `permissions` | array | | permission values <ul><li>Unified Account Permissions: uta_mgt Unified Account Management uta_trade Unified Account Trading </li></ul>This parameter is required when type has a value. |
1604
- | `ips` | array | | Withdrawal Whitelist IP <ul><li>If not provided, the IP address will not be modified.</li><li>If an empty value is provided, the withdrawal whitelist will be deleted.</li></ul>Multiple IP addresses are supported A maxim… |
1605
-
1606
- ```bash
1607
- bgc subaccount --action modifyApiKey --apikey <apikey> --passphrase <passphrase>
1608
- ```
1609
-
1610
- #### `bgc subaccount --action deleteApiKey`
1611
-
1612
- `POST /api/v3/user/delete-sub-api` · private · write
1613
-
1614
- Delete Sub-account API Key
1615
-
1616
- Required:
1617
-
1618
- | Param | Type | Enum | Description |
1619
- |-------|------|------|-------------|
1620
- | `apikey` | string | | The sub-account API Key |
1621
-
1622
- ```bash
1623
- bgc subaccount --action deleteApiKey --apikey <apikey>
1624
- ```
1625
-
1626
- #### `bgc subaccount --action depositAddress`
1627
-
1628
- `GET /api/v3/account/sub-deposit-address` · private
1629
-
1630
- Get Sub Deposit Address
1631
-
1632
- Required:
1633
-
1634
- | Param | Type | Enum | Description |
1635
- |-------|------|------|-------------|
1636
- | `subUid` | string | | Sub-account UID - The sub-account UID can be obtained via the Sub-account List API. |
1637
- | `coin` | string | | Coin name - The currency name can be obtained using the Get Currency Information API. |
1638
-
1639
- Optional:
1640
-
1641
- | Param | Type | Enum | Description |
1642
- |-------|------|------|-------------|
1643
- | `chain` | string | | Chain Name - The chain name can be obtained using the Get Currency Information API. |
1644
- | `size` | string | | Deposit Quantity - Only applies to BTC Lightning Network - Limit range: 0.000001 - 0.01. |
1645
-
1646
- ```bash
1647
- bgc subaccount --action depositAddress --subUid <subUid> --coin <coin>
1648
- ```
1649
-
1650
- #### `bgc subaccount --action depositRecords`
1651
-
1652
- `GET /api/v3/account/sub-deposit-records` · private
1653
-
1654
- Get Sub Deposit Records
1655
-
1656
- Optional:
1657
-
1658
- | Param | Type | Enum | Description |
1659
- |-------|------|------|-------------|
1660
- | `coin` | string | | Coin, e.g. USDT. |
1661
- | `subUid` | string | | Query parameter subUid. |
1662
- | `startTime` | string | | Query parameter startTime. |
1663
- | `endTime` | string | | Query parameter endTime. |
1664
- | `limit` | string | | Query parameter limit. |
1665
- | `cursor` | string | | Pagination cursor returned by the previous page. |
1666
-
1667
- ```bash
1668
- bgc subaccount --action depositRecords
1669
- ```
1670
-
1671
- ## Domain: broker
1672
-
1673
- ### `broker`
1674
-
1675
- risk: **write** · write: no · auth: private
1676
-
1677
- > Hidden to-B verb — opt in with `--modules broker` (not in `--modules all`).
1678
-
1679
- [VERB] Broker sub-accounts by intent: createSub \| modifySub \| listSubs \| API keys (apiKeys/createApiKey/modifyApiKey/deleteApiKey) \| withdraw \| depositAddress \| depositWithdrawRecords \| commission.
1680
-
1681
- **Actions:** `createSub`, `modifySub`, `listSubs`, `createApiKey`, `modifyApiKey`, `deleteApiKey`, `apiKeys`, `withdraw`, `depositAddress`, `depositWithdrawRecords`, `commission`
1682
-
1683
- #### `bgc broker --action createSub`
1684
-
1685
- `POST /api/v3/broker/create-sub` · private · write
1686
-
1687
- Create Broker Sub-Account
1688
-
1689
- Required:
1690
-
1691
- | Param | Type | Enum | Description |
1692
- |-------|------|------|-------------|
1693
- | `subaccountName` | string | | Sub-account username. |
1694
- | `label` | string | | label up to a maximum of 50 characters. |
1695
-
1696
- ```bash
1697
- bgc broker --action createSub --subaccountName <subaccountName> --label <label>
1698
- ```
1699
-
1700
- #### `bgc broker --action modifySub`
1701
-
1702
- `POST /api/v3/broker/modify-sub` · private · write
1703
-
1704
- Modify Broker Sub-Account
1705
-
1706
- Required:
1707
-
1708
- | Param | Type | Enum | Description |
1709
- |-------|------|------|-------------|
1710
- | `subUid` | string | | Sub-account UID |
1711
-
1712
- Optional:
1713
-
1714
- | Param | Type | Enum | Description |
1715
- |-------|------|------|-------------|
1716
- | `status` | string | | Sub-account status: normal freeze |
1717
- | `permList` | string | `spot_trade` \| `contract_trade` \| `margin_trade` \| `deposit` | Permission list withdraw transfer spot_trade spot trading contract_trade futures trading margin_trademargin trading deposit deposit permission |
1718
-
1719
- ```bash
1720
- bgc broker --action modifySub --subUid <subUid>
1721
- ```
1722
-
1723
- #### `bgc broker --action listSubs`
1724
-
1725
- `GET /api/v3/broker/sub-list` · private
1726
-
1727
- Get Broker Sub-Account List
1728
-
1729
- Optional:
1730
-
1731
- | Param | Type | Enum | Description |
1732
- |-------|------|------|-------------|
1733
- | `limit` | string | | Number of items per page - default 10, maximum 100. |
1734
- | `cursor` | string | | Cursor ID Used for pagination. Omit it on the first call. For subsequent calls, pass in the last subUid returned by the previous query. |
1735
- | `status` | string | `normal` \| `freeze` | Account status: normal normal freeze frozen |
1736
-
1737
- ```bash
1738
- bgc broker --action listSubs
1739
- ```
1740
-
1741
- #### `bgc broker --action createApiKey`
1742
-
1743
- `POST /api/v3/broker/create-sub-apikey` · private · write
1744
-
1745
- Create Broker Sub-Account API Key
1746
-
1747
- Required:
1748
-
1749
- | Param | Type | Enum | Description |
1750
- |-------|------|------|-------------|
1751
- | `subUid` | string | | Sub-account UID |
1752
- | `passphrase` | string | | Passphrase required to call the API. If lost, please create a new API key. |
1753
- | `label` | string | | label |
1754
- | `ipList` | string | | IP whitelist up to 30 entries can be provided |
1755
- | `permType` | string | `read_and_write` \| `readonly` | Permission type: read_and_write read & write readonly read-only |
1756
- | `permList` | string | `uta_trade` \| `uta_mgt` \| `withdraw` | Permission list: uta_trade UTA trading uta_mgt UTA management withdraw (permType must be read_and_write) |
1757
-
1758
- ```bash
1759
- bgc broker --action createApiKey --subUid <subUid> --passphrase <passphrase> --label <label> --ipList <ipList> --permType <permType> --permList <permList>
1760
- ```
1761
-
1762
- #### `bgc broker --action modifyApiKey`
1763
-
1764
- `POST /api/v3/broker/modify-sub-apikey` · private · write
1765
-
1766
- Modify Broker Sub-Account API Key
1767
-
1768
- Required:
1769
-
1770
- | Param | Type | Enum | Description |
1771
- |-------|------|------|-------------|
1772
- | `subUid` | string | | Sub-account UID |
1773
- | `passphrase` | string | | Passphrase required to call the API; if lost, please recreate the API key |
1774
- | `apiKey` | string | | API Key |
1775
-
1776
- Optional:
1777
-
1778
- | Param | Type | Enum | Description |
1779
- |-------|------|------|-------------|
1780
- | `label` | string | | label |
1781
- | `ipList` | string | | IP whitelist up to 30 entries |
1782
- | `permType` | string | `read_and_write` \| `readonly` | Permission type: read_and_write read & write readonly read-only |
1783
- | `permList` | string | `uta_trade` \| `uta_mgt` \| `withdraw` | Permission list: uta_trade UTA trading uta_mgt UTA management withdraw (permType must be read_and_write) |
1784
-
1785
- ```bash
1786
- bgc broker --action modifyApiKey --subUid <subUid> --passphrase <passphrase> --apiKey <apiKey>
1787
- ```
1788
-
1789
- #### `bgc broker --action deleteApiKey`
1790
-
1791
- `POST /api/v3/broker/delete-sub-apikey` · private · write
1792
-
1793
- Delete Broker Subaccount Apikey
1794
-
1795
- Required:
1796
-
1797
- | Param | Type | Enum | Description |
1798
- |-------|------|------|-------------|
1799
- | `subUid` | string | | Sub-account UID |
1800
- | `apiKey` | string | | API Key |
1801
-
1802
- ```bash
1803
- bgc broker --action deleteApiKey --subUid <subUid> --apiKey <apiKey>
1804
- ```
1805
-
1806
- #### `bgc broker --action apiKeys`
1807
-
1808
- `GET /api/v3/broker/query-sub-apikey` · private
1809
-
1810
- Get Broker Sub-Account API Key
1811
-
1812
- Required:
1813
-
1814
- | Param | Type | Enum | Description |
1815
- |-------|------|------|-------------|
1816
- | `subUid` | string | | Sub-account UID |
1817
-
1818
- ```bash
1819
- bgc broker --action apiKeys --subUid <subUid>
1820
- ```
1821
-
1822
- #### `bgc broker --action withdraw` — **[DANGER] requires `--confirm`**
1823
-
1824
- `POST /api/v3/broker/sub-withdrawal` · private · write
1825
-
1826
- Broker Subaccount Withdrawal
1827
-
1828
- Required:
1829
-
1830
- | Param | Type | Enum | Description |
1831
- |-------|------|------|-------------|
1832
- | `subUid` | string | | Sub-account UID |
1833
- | `coin` | string | | coin name |
1834
- | `dest` | string | `on_chain` \| `internal_transfer` | Withdrawal method: on_chain on-chain withdrawal internal_transfer internal transfer |
1835
- | `address` | string | | Withdrawal address- when using on-chain withdrawal, enter the on-chain address; when using internal transfer, enter the UID |
1836
- | `amount` | string | | Withdrawal amount |
1837
-
1838
- Optional:
1839
-
1840
- | Param | Type | Enum | Description |
1841
- |-------|------|------|-------------|
1842
- | `chain` | string | | Chain name- if this parameter is not provided, it defaults to the coin’s main chain |
1843
- | `tag` | string | | Tag - used for some chains (e.g., EOS memo, TON comment) |
1844
- | `clientOid` | string | | Custom order ID |
1845
-
1846
- ```bash
1847
- bgc broker --action withdraw --subUid <subUid> --coin <coin> --dest <dest> --address <address> --amount <amount>
1848
- ```
1849
-
1850
- #### `bgc broker --action depositAddress`
1851
-
1852
- `POST /api/v3/broker/sub-deposit-address` · private
1853
-
1854
- Get Broker Subaccount Deposit Address
1855
-
1856
- Required:
1857
-
1858
- | Param | Type | Enum | Description |
1859
- |-------|------|------|-------------|
1860
- | `subUid` | string | | Sub-account UID |
1861
- | `coin` | string | | Coin name |
1862
-
1863
- Optional:
1864
-
1865
- | Param | Type | Enum | Description |
1866
- |-------|------|------|-------------|
1867
- | `chain` | string | | Chain name If this parameter is not provided, the default will be the coin’s primary (main) chain |
1868
-
1869
- ```bash
1870
- bgc broker --action depositAddress --subUid <subUid> --coin <coin>
1871
- ```
1872
-
1873
- #### `bgc broker --action depositWithdrawRecords`
1874
-
1875
- `GET /api/v3/broker/all-sub-deposit-withdrawal` · private
1876
-
1877
- Get All Broker Subaccount Deposit Withdrawal
1878
-
1879
- Optional:
1880
-
1881
- | Param | Type | Enum | Description |
1882
- |-------|------|------|-------------|
1883
- | `startTime` | string | | Record start time Unix timestamp in milliseconds. If both startTime and endTime are empty, the default query time range is yesterday 00:00–23:59 (UTC+0). The time range between startTime and endTime cannot exceed 7 days. |
1884
- | `endTime` | string | | Record end time Unix timestamp in milliseconds. If both startTime and endTime are empty, the default query time range is yesterday 00:00–23:59 (UTC+0). The time range between startTime and endTime cannot exceed 7 days. |
1885
- | `limit` | string | | Number of items per page default 100, maximum 100. |
1886
- | `cursor` | string | | Cursor ID. |
1887
- | `status` | string | `pending` \| `fail` \| `success` | Status pendingConfirming failFailed successSuccessful |
1888
-
1889
- ```bash
1890
- bgc broker --action depositWithdrawRecords
1891
- ```
1892
-
1893
- #### `bgc broker --action commission`
1894
-
1895
- `GET /api/v3/broker/commission` · private
1896
-
1897
- Get Broker Commission
1898
-
1899
- Optional:
1900
-
1901
- | Param | Type | Enum | Description |
1902
- |-------|------|------|-------------|
1903
- | `startTime` | string | | Query start time Unix timestamp in milliseconds. If both startTime and endTime are omitted, the default query range is yesterday 00:00–23:59 (UTC+0). The interval between startTime and endTime for a single query cannot … |
1904
- | `endTime` | string | | Query end time Unix timestamp in milliseconds. If both startTime and endTime are omitted, the default query range is yesterday 00:00–23:59 (UTC+0). The interval between startTime and endTime for a single query cannot ex… |
1905
- | `pageSize` | string | | Number of items per page default 100, maximum 1000 |
1906
- | `pageNo` | string | | Page number - default 1. |
1907
- | `bizType` | string | | Business type spot futures - If not provided, commission data for all types will be returned. |
1908
- | `subBizType` | string | `spot_trade` \| `spot_margin` \| `usdt_futures` \| `usdc_futures` \| `coin_futures` | Business sub-type: spot_trade spot trading spot_margin spot margin usdt_futures USDT futures usdc_futures USDC futures coin_futures coin-margin futures When bizType=spot, this parameter can be spot_trade or spot_margin.… |
1909
-
1910
- ```bash
1911
- bgc broker --action commission
1912
- ```
1913
-
1914
- ## Domain: loan
1915
-
1916
- ### `loan`
1917
-
1918
- risk: **write** · write: no · auth: private
1919
-
1920
- [VERB] Crypto loans by intent: borrow \| repay \| revisePledge \| ongoing \| borrowHistory \| repayHistory \| debts \| interest \| reduces \| coins \| pledgeRateHistory.
1921
-
1922
- **Actions:** `borrow`, `repay`, `revisePledge`, `ongoing`, `borrowHistory`, `repayHistory`, `debts`, `interest`, `reduces`, `coins`, `pledgeRateHistory`
1923
-
1924
- #### `bgc loan --action borrow`
1925
-
1926
- `POST /api/v3/loan/borrow` · private · write
1927
-
1928
- Borrow Coins
1929
-
1930
- Required:
1931
-
1932
- | Param | Type | Enum | Description |
1933
- |-------|------|------|-------------|
1934
- | `loanCoin` | string | | Coin to borrow e.g.BTC |
1935
- | `pledgeCoin` | string | | Collateral coin e.g.ETH |
1936
- | `daily` | string | `SEVEN` \| `THIRTY` \| `FLEXIBLE` | Pledge term: SEVEN 7 days THIRTY 30 days FLEXIBLE flexible |
1937
-
1938
- Optional:
1939
-
1940
- | Param | Type | Enum | Description |
1941
- |-------|------|------|-------------|
1942
- | `pledgeAmount` | string | | Collateral amount choose one of pledgeAmount or loanAmount |
1943
- | `loanAmount` | string | | Borrow amount choose one of loanAmount or pledgeAmount |
1944
-
1945
- ```bash
1946
- bgc loan --action borrow --loanCoin <loanCoin> --pledgeCoin <pledgeCoin> --daily <daily>
1947
- ```
1948
-
1949
- #### `bgc loan --action repay`
1950
-
1951
- `POST /api/v3/loan/repay` · private · write
1952
-
1953
- Repay Coins
1954
-
1955
- Required:
1956
-
1957
- | Param | Type | Enum | Description |
1958
- |-------|------|------|-------------|
1959
- | `orderId` | string | | Order ID |
1960
- | `method` | string | `borrowed_coin` \| `collateral` | Repayment method borrowed_coinborrowed coin collateralcollateral |
1961
- | `repayAll` | string | | Repay in full yes no If yes, the repayment amount will be ignored |
1962
-
1963
- Optional:
1964
-
1965
- | Param | Type | Enum | Description |
1966
- |-------|------|------|-------------|
1967
- | `amount` | string | | Repayment amount Required when repayAll=no |
1968
- | `repayUnlock` | string | `yes` \| `no` | Whether to redeem collateral yesredeem nodo not redeem Default is no if omitted. Not effective when repayAll=yes |
1969
-
1970
- ```bash
1971
- bgc loan --action repay --orderId <orderId> --method <method> --repayAll <repayAll>
1972
- ```
1973
-
1974
- #### `bgc loan --action revisePledge`
1975
-
1976
- `POST /api/v3/loan/revise-pledge` · private · write
1977
-
1978
- Revise Pledge
1979
-
1980
- Required:
1981
-
1982
- | Param | Type | Enum | Description |
1983
- |-------|------|------|-------------|
1984
- | `orderId` | string | | Order ID |
1985
- | `amount` | string | | Adjustment amount |
1986
- | `pledgeCoin` | string | | Collateral coin |
1987
-
1988
- Optional:
1989
-
1990
- | Param | Type | Enum | Description |
1991
- |-------|------|------|-------------|
1992
- | `reviseType` | string | `OUT` \| `IN` | Adjustment type OUT: withdraw collateral IN add collateral |
1993
-
1994
- ```bash
1995
- bgc loan --action revisePledge --orderId <orderId> --amount <amount> --pledgeCoin <pledgeCoin>
1996
- ```
1997
-
1998
- #### `bgc loan --action ongoing`
1999
-
2000
- `GET /api/v3/loan/borrow-ongoing` · private
2001
-
2002
- Get Borrow Ongoing
2003
-
2004
- Optional:
2005
-
2006
- | Param | Type | Enum | Description |
2007
- |-------|------|------|-------------|
2008
- | `orderId` | string | | Order ID |
2009
- | `loanCoin` | string | | Borrowed coin |
2010
- | `pledgeCoin` | string | | Collateral coin |
2011
-
2012
- ```bash
2013
- bgc loan --action ongoing
2014
- ```
2015
-
2016
- #### `bgc loan --action borrowHistory`
2017
-
2018
- `GET /api/v3/loan/borrow-history` · private
2019
-
2020
- Get Borrow History
2021
-
2022
- Required:
2023
-
2024
- | Param | Type | Enum | Description |
2025
- |-------|------|------|-------------|
2026
- | `startTime` | string | | Start time only supports querying data from the last 3 months |
2027
- | `endTime` | string | | End time |
2028
-
2029
- Optional:
2030
-
2031
- | Param | Type | Enum | Description |
2032
- |-------|------|------|-------------|
2033
- | `orderId` | string | | Order ID |
2034
- | `loanCoin` | string | | Borrowed coin |
2035
- | `pledgeCoin` | string | | Collateral coin |
2036
- | `status` | string | `ROLLBACK` \| `FORCE` \| `REPAY` | Status ROLLBACK: failed FORCE: liquidated REPAY: repaid |
2037
- | `pageNum` | string | | Page number default is 1 |
2038
- | `pageSize` | string | | Items per page default is 10,maximum is 100 |
2039
-
2040
- ```bash
2041
- bgc loan --action borrowHistory --startTime <startTime> --endTime <endTime>
2042
- ```
2043
-
2044
- #### `bgc loan --action repayHistory`
2045
-
2046
- `GET /api/v3/loan/repay-history` · private
2047
-
2048
- Get Repay History
2049
-
2050
- Required:
2051
-
2052
- | Param | Type | Enum | Description |
2053
- |-------|------|------|-------------|
2054
- | `startTime` | string | | Start time only supports querying data from the last 3 months |
2055
- | `endTime` | string | | End time |
2056
-
2057
- Optional:
2058
-
2059
- | Param | Type | Enum | Description |
2060
- |-------|------|------|-------------|
2061
- | `orderId` | string | | Order ID |
2062
- | `loanCoin` | string | | Borrowed coin |
2063
- | `pledgeCoin` | string | | Collateral coin |
2064
- | `pageNum` | string | | Page number default is 1 |
2065
- | `pageSize` | string | | Items per page default is 10,maximum is 100 |
2066
-
2067
- ```bash
2068
- bgc loan --action repayHistory --startTime <startTime> --endTime <endTime>
2069
- ```
2070
-
2071
- #### `bgc loan --action debts`
2072
-
2073
- `GET /api/v3/loan/debts` · private
2074
-
2075
- Get Loan Debts
2076
-
2077
- _No business parameters._
2078
-
2079
- ```bash
2080
- bgc loan --action debts
2081
- ```
2082
-
2083
- #### `bgc loan --action interest`
2084
-
2085
- `GET /api/v3/loan/interest` · private
2086
-
2087
- Get Loan Interest
2088
-
2089
- Required:
2090
-
2091
- | Param | Type | Enum | Description |
2092
- |-------|------|------|-------------|
2093
- | `loanCoin` | string | | Coin to borrow e.g.BTC |
2094
- | `pledgeCoin` | string | | Collateral coin e.g.ETH |
2095
- | `daily` | string | `SEVEN` \| `THIRTY` \| `FLEXIBLE` | Pledge term: SEVEN 7 days THIRTY 30 days FLEXIBLE flexible |
2096
- | `pledgeAmount` | string | | Pledge Amount |
2097
-
2098
- ```bash
2099
- bgc loan --action interest --loanCoin <loanCoin> --pledgeCoin <pledgeCoin> --daily <daily> --pledgeAmount <pledgeAmount>
2100
- ```
2101
-
2102
- #### `bgc loan --action reduces`
2103
-
2104
- `GET /api/v3/loan/reduces` · private
2105
-
2106
- Get Loan Reduces
2107
-
2108
- Required:
2109
-
2110
- | Param | Type | Enum | Description |
2111
- |-------|------|------|-------------|
2112
- | `startTime` | string | | Start time only supports querying data from the last 3 months |
2113
- | `endTime` | string | | End time |
2114
-
2115
- Optional:
2116
-
2117
- | Param | Type | Enum | Description |
2118
- |-------|------|------|-------------|
2119
- | `orderId` | string | | Order ID |
2120
- | `loanCoin` | string | | Borrowed coin |
2121
- | `pledgeCoin` | string | | Collateral coin |
2122
- | `status` | string | `COMPLETE` \| `WAIT` | Liquidation status COMPLETE liquidated WAIT liquidation |
2123
- | `pageNum` | string | | Page number default is 1 |
2124
- | `pageSize` | string | | Items per page default is 10,maximum is 100 |
2125
-
2126
- ```bash
2127
- bgc loan --action reduces --startTime <startTime> --endTime <endTime>
2128
- ```
2129
-
2130
- #### `bgc loan --action coins`
2131
-
2132
- `GET /api/v3/loan/coins` · private
2133
-
2134
- Get Loan Coins
2135
-
2136
- Optional:
2137
-
2138
- | Param | Type | Enum | Description |
2139
- |-------|------|------|-------------|
2140
- | `coin` | string | | Coin name |
2141
-
2142
- ```bash
2143
- bgc loan --action coins
2144
- ```
2145
-
2146
- #### `bgc loan --action pledgeRateHistory`
2147
-
2148
- `GET /api/v3/loan/pledge-rate-history` · private
2149
-
2150
- Get Pledge Rate History
2151
-
2152
- Required:
2153
-
2154
- | Param | Type | Enum | Description |
2155
- |-------|------|------|-------------|
2156
- | `startTime` | string | | Start time only supports querying data from the last 3 months |
2157
- | `endTime` | string | | End time |
2158
-
2159
- Optional:
2160
-
2161
- | Param | Type | Enum | Description |
2162
- |-------|------|------|-------------|
2163
- | `orderId` | string | | Order ID |
2164
- | `reviseSide` | string | `down` \| `up` | Adjustment direction down: transfer in, decrease up: transfer out, increase |
2165
- | `pledgeCoin` | string | | Collateral coin |
2166
- | `pageNum` | string | | Page number default is 1 |
2167
- | `pageSize` | string | | Items per page default is 10,maximum is 100 |
2168
-
2169
- ```bash
2170
- bgc loan --action pledgeRateHistory --startTime <startTime> --endTime <endTime>
2171
- ```
2172
-
2173
- ## Domain: instloan
2174
-
2175
- ### `inst_loan`
2176
-
2177
- risk: **write** · write: no · auth: private
2178
-
2179
- > Hidden to-B verb — opt in with `--modules instloan` (not in `--modules all`).
2180
-
2181
- [VERB] Institutional loans by intent: bindUid (risk unit) \| orders \| ltv \| marginCoins \| products \| repaymentOrders \| riskUnit \| symbols \| transferred.
2182
-
2183
- **Actions:** `bindUid`, `orders`, `ltv`, `marginCoins`, `products`, `repaymentOrders`, `riskUnit`, `symbols`, `transferred`
2184
-
2185
- #### `bgc inst_loan --action bindUid`
2186
-
2187
- `POST /api/v3/ins-loan/bind-uid` · private · write
2188
-
2189
- Bind/Unbind UID to Risk Unit
2190
-
2191
- Required:
2192
-
2193
- | Param | Type | Enum | Description |
2194
- |-------|------|------|-------------|
2195
- | `uid` | string | | Sub UID(limit 50 UIDS for one Risk Unit) |
2196
- | `operate` | string | `bind` \| `unbind` | bind Bind unbind Unbind |
2197
-
2198
- Optional:
2199
-
2200
- | Param | Type | Enum | Description |
2201
- |-------|------|------|-------------|
2202
- | `riskUnitId` | string | | Risk Unit ID (Required for parent account calls, not required for risk unit account calls) |
2203
-
2204
- ```bash
2205
- bgc inst_loan --action bindUid --uid <uid> --operate <operate>
2206
- ```
2207
-
2208
- #### `bgc inst_loan --action orders`
2209
-
2210
- `GET /api/v3/ins-loan/loan-order` · private
2211
-
2212
- Get Loan Orders
2213
-
2214
- Optional:
2215
-
2216
- | Param | Type | Enum | Description |
2217
- |-------|------|------|-------------|
2218
- | `orderId` | string | | oan order id. If not passed, then return all orders, sort by loanTime in descend |
2219
- | `startTime` | string | | The start timestamp (ms) |
2220
- | `endTime` | string | | The end timestamp (ms) |
2221
-
2222
- ```bash
2223
- bgc inst_loan --action orders
2224
- ```
2225
-
2226
- #### `bgc inst_loan --action ltv`
2227
-
2228
- `GET /api/v3/ins-loan/ltv-convert` · private
2229
-
2230
- Get LTV
2231
-
2232
- Optional:
2233
-
2234
- | Param | Type | Enum | Description |
2235
- |-------|------|------|-------------|
2236
- | `riskUnitId` | string | | Risk Unit ID |
2237
-
2238
- ```bash
2239
- bgc inst_loan --action ltv
2240
- ```
2241
-
2242
- #### `bgc inst_loan --action marginCoins`
2243
-
2244
- `GET /api/v3/ins-loan/ensure-coins-convert` · private
2245
-
2246
- Get Margin Coin Info
2247
-
2248
- Required:
2249
-
2250
- | Param | Type | Enum | Description |
2251
- |-------|------|------|-------------|
2252
- | `productId` | string | | Product Id |
2253
-
2254
- ```bash
2255
- bgc inst_loan --action marginCoins --productId <productId>
2256
- ```
2257
-
2258
- #### `bgc inst_loan --action products`
2259
-
2260
- `GET /api/v3/ins-loan/product-infos` · private
2261
-
2262
- Get Product Info
2263
-
2264
- Required:
2265
-
2266
- | Param | Type | Enum | Description |
2267
- |-------|------|------|-------------|
2268
- | `productId` | string | | Product Id |
2269
-
2270
- ```bash
2271
- bgc inst_loan --action products --productId <productId>
2272
- ```
2273
-
2274
- #### `bgc inst_loan --action repaymentOrders`
2275
-
2276
- `GET /api/v3/ins-loan/repaid-history` · private
2277
-
2278
- Get Repayment Orders
2279
-
2280
- Optional:
2281
-
2282
- | Param | Type | Enum | Description |
2283
- |-------|------|------|-------------|
2284
- | `startTime` | string | | The start timestamp (ms) |
2285
- | `endTime` | string | | The end timestamp (ms) |
2286
- | `limit` | string | | Limit default 100; max 100 |
2287
-
2288
- ```bash
2289
- bgc inst_loan --action repaymentOrders
2290
- ```
2291
-
2292
- #### `bgc inst_loan --action riskUnit`
2293
-
2294
- `GET /api/v3/ins-loan/risk-unit` · private
2295
-
2296
- Get Risk Unit
2297
-
2298
- _No business parameters._
2299
-
2300
- ```bash
2301
- bgc inst_loan --action riskUnit
2302
- ```
2303
-
2304
- #### `bgc inst_loan --action symbols`
2305
-
2306
- `GET /api/v3/ins-loan/symbols` · private
2307
-
2308
- Get Trade Symbols
2309
-
2310
- Required:
2311
-
2312
- | Param | Type | Enum | Description |
2313
- |-------|------|------|-------------|
2314
- | `productId` | string | | Product Id |
2315
-
2316
- ```bash
2317
- bgc inst_loan --action symbols --productId <productId>
2318
- ```
2319
-
2320
- #### `bgc inst_loan --action transferred`
2321
-
2322
- `GET /api/v3/ins-loan/transfered` · private
2323
-
2324
- Get Transferred Quantity
2325
-
2326
- Required:
2327
-
2328
- | Param | Type | Enum | Description |
2329
- |-------|------|------|-------------|
2330
- | `coin` | string | | Coin |
2331
-
2332
- Optional:
2333
-
2334
- | Param | Type | Enum | Description |
2335
- |-------|------|------|-------------|
2336
- | `userId` | string | | User Id (Master account or sub-accounts) |
2337
-
2338
- ```bash
2339
- bgc inst_loan --action transferred --coin <coin>
2340
- ```
2341
-
2342
- ## Domain: tax
2343
-
2344
- ### `tax`
2345
-
2346
- risk: **read** · write: no · auth: private
2347
-
2348
- [VERB] Tax records (read-only): records lists unified-account tax records.
2349
-
2350
- **Actions:** `records`
2351
-
2352
- #### `bgc tax --action records`
2353
-
2354
- `GET /api/v3/tax/records` · private
2355
-
2356
- Get Unified Account Tax Records
2357
-
2358
- Required:
2359
-
2360
- | Param | Type | Enum | Description |
2361
- |-------|------|------|-------------|
2362
- | `bizType` | string | `SPOT` \| `MARGIN` \| `USDT-FUTURES` \| `COIN-FUTURES` \| `USDC-FUTURES` \| `OTHER` | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures OTHER Other |
2363
- | `startTime` | string | | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 |
2364
- | `endTime` | string | | End timestamp A Unix timestamp in milliseconds e.g.,1597026383185 The time range between startTime and endTime must not exceed 7 days |
2365
-
2366
- Optional:
2367
-
2368
- | Param | Type | Enum | Description |
2369
- |-------|------|------|-------------|
2370
- | `marginType` | string | `isolated` \| `crossed` | Margin Type: isolated isolated margin crossed cross margin. This field is effective when category=MARGIN. If not specified, the default is crossed (cross margin). |
2371
- | `coin` | string | | Coin name - If not specified, tax records for all coins will be returned. |
2372
- | `limit` | string | | Limit per page Default:500. Maximum:500 |
2373
- | `cursor` | string | | Cursor ID - Used for pagination. Do not include it for the first query. When querying the second page and subsequent data, use the id returned from the previous query. The interface will then return the data for the nex… |
2374
-
2375
- ```bash
2376
- bgc tax --action records --bizType <bizType> --startTime <startTime> --endTime <endTime>
2377
- ```
2378
-
2379
- ## Meta tools
2380
-
2381
- ### `discover`
2382
-
2383
- Progressive introspection of the live surface. `bgc discover` lists domains; `--domain <d>` lists a domain's verbs; `--tool <t>` returns one verb's full schema; `--tool <t> --action <a>` returns one action's exact required/optional contract; `--search <q>` keyword-searches the whole surface.
2384
-
2385
- ### `raw`
2386
-
2387
- Escape hatch to any catalog operation by id, bypassing the intent layer: `bgc raw --operationId <id> --args '<json>'`. Use when no verb fronts the operation you need.