@okx_ai/okx-trade-cli 1.2.5-beta.5 → 1.2.5
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.
- package/dist/index.js +85 -91
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3196,7 +3196,7 @@ function registerEarnTools() {
|
|
|
3196
3196
|
{
|
|
3197
3197
|
name: "earn_get_savings_balance",
|
|
3198
3198
|
module: "earn.savings",
|
|
3199
|
-
description: "Get Simple Earn (savings/flexible earn) balance. Returns current holdings for all currencies or a specific one. To show market rates alongside balance (\u5E02\u573A\u5747\u5229\u7387), call earn_get_lending_rate_history \u2014 do NOT use earn_get_lending_rate_summary for this purpose.
|
|
3199
|
+
description: "Get Simple Earn (savings/flexible earn) balance. Returns current holdings for all currencies or a specific one. To show market rates alongside balance (\u5E02\u573A\u5747\u5229\u7387), call earn_get_lending_rate_history \u2014 do NOT use earn_get_lending_rate_summary for this purpose.",
|
|
3200
3200
|
isWrite: false,
|
|
3201
3201
|
inputSchema: {
|
|
3202
3202
|
type: "object",
|
|
@@ -3220,7 +3220,7 @@ function registerEarnTools() {
|
|
|
3220
3220
|
{
|
|
3221
3221
|
name: "earn_savings_purchase",
|
|
3222
3222
|
module: "earn.savings",
|
|
3223
|
-
description: "Purchase Simple Earn (savings/flexible earn). [CAUTION] Moves real funds into earn product.
|
|
3223
|
+
description: "Purchase Simple Earn (savings/flexible earn). [CAUTION] Moves real funds into earn product.",
|
|
3224
3224
|
isWrite: true,
|
|
3225
3225
|
inputSchema: {
|
|
3226
3226
|
type: "object",
|
|
@@ -3259,7 +3259,7 @@ function registerEarnTools() {
|
|
|
3259
3259
|
{
|
|
3260
3260
|
name: "earn_savings_redeem",
|
|
3261
3261
|
module: "earn.savings",
|
|
3262
|
-
description: "Redeem Simple Earn (savings/flexible earn). [CAUTION] Withdraws funds from earn product.
|
|
3262
|
+
description: "Redeem Simple Earn (savings/flexible earn). [CAUTION] Withdraws funds from earn product.",
|
|
3263
3263
|
isWrite: true,
|
|
3264
3264
|
inputSchema: {
|
|
3265
3265
|
type: "object",
|
|
@@ -3293,7 +3293,7 @@ function registerEarnTools() {
|
|
|
3293
3293
|
{
|
|
3294
3294
|
name: "earn_set_lending_rate",
|
|
3295
3295
|
module: "earn.savings",
|
|
3296
|
-
description: "Set lending rate for Simple Earn. [CAUTION] Changes your lending rate preference.
|
|
3296
|
+
description: "Set lending rate for Simple Earn. [CAUTION] Changes your lending rate preference.",
|
|
3297
3297
|
isWrite: true,
|
|
3298
3298
|
inputSchema: {
|
|
3299
3299
|
type: "object",
|
|
@@ -3326,7 +3326,7 @@ function registerEarnTools() {
|
|
|
3326
3326
|
{
|
|
3327
3327
|
name: "earn_get_lending_history",
|
|
3328
3328
|
module: "earn.savings",
|
|
3329
|
-
description: "Get market lending rate history for Simple Earn. Use this tool to query market lending rates. Returns market lending records with amount, rate, and earnings data.
|
|
3329
|
+
description: "Get market lending rate history for Simple Earn. Use this tool to query market lending rates. Returns market lending records with amount, rate, and earnings data.",
|
|
3330
3330
|
isWrite: false,
|
|
3331
3331
|
inputSchema: {
|
|
3332
3332
|
type: "object",
|
|
@@ -3367,7 +3367,7 @@ function registerEarnTools() {
|
|
|
3367
3367
|
{
|
|
3368
3368
|
name: "earn_get_lending_rate_summary",
|
|
3369
3369
|
module: "earn.savings",
|
|
3370
|
-
description: "Get coin lending market rate summary. NOT related to Simple Earn.
|
|
3370
|
+
description: "Get coin lending market rate summary. NOT related to Simple Earn. Use this to query the lending/borrowing market rates (\u501F\u5E01\u5E02\u573A\u5229\u7387). Returns aggregate overview: average rate (avgRate), estimated next-cycle rate (estRate), previous-cycle rate (preRate), and available lending amounts.",
|
|
3371
3371
|
isWrite: false,
|
|
3372
3372
|
inputSchema: {
|
|
3373
3373
|
type: "object",
|
|
@@ -3391,7 +3391,7 @@ function registerEarnTools() {
|
|
|
3391
3391
|
{
|
|
3392
3392
|
name: "earn_get_lending_rate_history",
|
|
3393
3393
|
module: "earn.savings",
|
|
3394
|
-
description: "Query Simple Earn lending rates.
|
|
3394
|
+
description: "Query Simple Earn lending rates. Use this tool when the user asks about current or historical lending rates for Simple Earn, or when displaying savings balance with market rate context (\u5E02\u573A\u5747\u5229\u7387). Returns actual settled lending rate records (lendingRate field) with timestamps, ordered newest-first.",
|
|
3395
3395
|
isWrite: false,
|
|
3396
3396
|
inputSchema: {
|
|
3397
3397
|
type: "object",
|
|
@@ -3439,22 +3439,22 @@ function registerOnchainEarnTools() {
|
|
|
3439
3439
|
{
|
|
3440
3440
|
name: "onchain_earn_get_offers",
|
|
3441
3441
|
module: "earn.onchain",
|
|
3442
|
-
description: "
|
|
3442
|
+
description: "List staking/DeFi products with APY, terms, and limits. Always show protocol name (protocol field) and earnings currency (earningData[].ccy) when presenting results.",
|
|
3443
3443
|
isWrite: false,
|
|
3444
3444
|
inputSchema: {
|
|
3445
3445
|
type: "object",
|
|
3446
3446
|
properties: {
|
|
3447
3447
|
productId: {
|
|
3448
3448
|
type: "string",
|
|
3449
|
-
description: "
|
|
3449
|
+
description: "Product ID filter."
|
|
3450
3450
|
},
|
|
3451
3451
|
protocolType: {
|
|
3452
3452
|
type: "string",
|
|
3453
|
-
description: "
|
|
3453
|
+
description: "staking|defi"
|
|
3454
3454
|
},
|
|
3455
3455
|
ccy: {
|
|
3456
3456
|
type: "string",
|
|
3457
|
-
description: "
|
|
3457
|
+
description: "e.g. ETH"
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
3460
|
},
|
|
@@ -3478,34 +3478,34 @@ function registerOnchainEarnTools() {
|
|
|
3478
3478
|
{
|
|
3479
3479
|
name: "onchain_earn_purchase",
|
|
3480
3480
|
module: "earn.onchain",
|
|
3481
|
-
description: "
|
|
3481
|
+
description: "Invest in a staking/DeFi product. [CAUTION] Moves real funds. Not available in demo mode.",
|
|
3482
3482
|
isWrite: true,
|
|
3483
3483
|
inputSchema: {
|
|
3484
3484
|
type: "object",
|
|
3485
3485
|
properties: {
|
|
3486
3486
|
productId: {
|
|
3487
3487
|
type: "string",
|
|
3488
|
-
description: "Product ID
|
|
3488
|
+
description: "Product ID"
|
|
3489
3489
|
},
|
|
3490
3490
|
investData: {
|
|
3491
3491
|
type: "array",
|
|
3492
|
-
description: "
|
|
3492
|
+
description: "Array of {ccy, amt} to invest.",
|
|
3493
3493
|
items: {
|
|
3494
3494
|
type: "object",
|
|
3495
3495
|
properties: {
|
|
3496
|
-
ccy: { type: "string", description: "
|
|
3497
|
-
amt: { type: "string"
|
|
3496
|
+
ccy: { type: "string", description: "e.g. ETH" },
|
|
3497
|
+
amt: { type: "string" }
|
|
3498
3498
|
},
|
|
3499
3499
|
required: ["ccy", "amt"]
|
|
3500
3500
|
}
|
|
3501
3501
|
},
|
|
3502
3502
|
term: {
|
|
3503
3503
|
type: "string",
|
|
3504
|
-
description: "Investment term in days
|
|
3504
|
+
description: "Investment term in days, required for fixed-term products."
|
|
3505
3505
|
},
|
|
3506
3506
|
tag: {
|
|
3507
3507
|
type: "string",
|
|
3508
|
-
description: "Order tag
|
|
3508
|
+
description: "Order tag."
|
|
3509
3509
|
}
|
|
3510
3510
|
},
|
|
3511
3511
|
required: ["productId", "investData"]
|
|
@@ -3532,22 +3532,22 @@ function registerOnchainEarnTools() {
|
|
|
3532
3532
|
{
|
|
3533
3533
|
name: "onchain_earn_redeem",
|
|
3534
3534
|
module: "earn.onchain",
|
|
3535
|
-
description: "Redeem
|
|
3535
|
+
description: "Redeem a staking/DeFi investment. [CAUTION] Some products have lock periods, early redemption may incur penalties. Not available in demo mode.",
|
|
3536
3536
|
isWrite: true,
|
|
3537
3537
|
inputSchema: {
|
|
3538
3538
|
type: "object",
|
|
3539
3539
|
properties: {
|
|
3540
3540
|
ordId: {
|
|
3541
3541
|
type: "string",
|
|
3542
|
-
description: "Order ID
|
|
3542
|
+
description: "Order ID"
|
|
3543
3543
|
},
|
|
3544
3544
|
protocolType: {
|
|
3545
3545
|
type: "string",
|
|
3546
|
-
description: "
|
|
3546
|
+
description: "staking|defi"
|
|
3547
3547
|
},
|
|
3548
3548
|
allowEarlyRedeem: {
|
|
3549
3549
|
type: "boolean",
|
|
3550
|
-
description: "Allow early
|
|
3550
|
+
description: "Allow early exit for fixed-term products, may incur penalties. Default: false."
|
|
3551
3551
|
}
|
|
3552
3552
|
},
|
|
3553
3553
|
required: ["ordId", "protocolType"]
|
|
@@ -3573,18 +3573,18 @@ function registerOnchainEarnTools() {
|
|
|
3573
3573
|
{
|
|
3574
3574
|
name: "onchain_earn_cancel",
|
|
3575
3575
|
module: "earn.onchain",
|
|
3576
|
-
description: "Cancel pending
|
|
3576
|
+
description: "Cancel a pending staking/DeFi purchase order. [CAUTION] Not available in demo mode.",
|
|
3577
3577
|
isWrite: true,
|
|
3578
3578
|
inputSchema: {
|
|
3579
3579
|
type: "object",
|
|
3580
3580
|
properties: {
|
|
3581
3581
|
ordId: {
|
|
3582
3582
|
type: "string",
|
|
3583
|
-
description: "Order ID
|
|
3583
|
+
description: "Order ID"
|
|
3584
3584
|
},
|
|
3585
3585
|
protocolType: {
|
|
3586
3586
|
type: "string",
|
|
3587
|
-
description: "
|
|
3587
|
+
description: "staking|defi"
|
|
3588
3588
|
}
|
|
3589
3589
|
},
|
|
3590
3590
|
required: ["ordId", "protocolType"]
|
|
@@ -3609,26 +3609,26 @@ function registerOnchainEarnTools() {
|
|
|
3609
3609
|
{
|
|
3610
3610
|
name: "onchain_earn_get_active_orders",
|
|
3611
3611
|
module: "earn.onchain",
|
|
3612
|
-
description: "
|
|
3612
|
+
description: "List current active staking/DeFi investments.",
|
|
3613
3613
|
isWrite: false,
|
|
3614
3614
|
inputSchema: {
|
|
3615
3615
|
type: "object",
|
|
3616
3616
|
properties: {
|
|
3617
3617
|
productId: {
|
|
3618
3618
|
type: "string",
|
|
3619
|
-
description: "
|
|
3619
|
+
description: "Product ID filter."
|
|
3620
3620
|
},
|
|
3621
3621
|
protocolType: {
|
|
3622
3622
|
type: "string",
|
|
3623
|
-
description: "
|
|
3623
|
+
description: "staking|defi"
|
|
3624
3624
|
},
|
|
3625
3625
|
ccy: {
|
|
3626
3626
|
type: "string",
|
|
3627
|
-
description: "
|
|
3627
|
+
description: "e.g. ETH"
|
|
3628
3628
|
},
|
|
3629
3629
|
state: {
|
|
3630
3630
|
type: "string",
|
|
3631
|
-
description: "
|
|
3631
|
+
description: "8=pending, 13=cancelling, 9=onchain, 1=earning, 2=redeeming"
|
|
3632
3632
|
}
|
|
3633
3633
|
}
|
|
3634
3634
|
},
|
|
@@ -3653,34 +3653,34 @@ function registerOnchainEarnTools() {
|
|
|
3653
3653
|
{
|
|
3654
3654
|
name: "onchain_earn_get_order_history",
|
|
3655
3655
|
module: "earn.onchain",
|
|
3656
|
-
description: "
|
|
3656
|
+
description: "List past staking/DeFi orders including redeemed ones.",
|
|
3657
3657
|
isWrite: false,
|
|
3658
3658
|
inputSchema: {
|
|
3659
3659
|
type: "object",
|
|
3660
3660
|
properties: {
|
|
3661
3661
|
productId: {
|
|
3662
3662
|
type: "string",
|
|
3663
|
-
description: "
|
|
3663
|
+
description: "Product ID filter."
|
|
3664
3664
|
},
|
|
3665
3665
|
protocolType: {
|
|
3666
3666
|
type: "string",
|
|
3667
|
-
description: "
|
|
3667
|
+
description: "staking|defi"
|
|
3668
3668
|
},
|
|
3669
3669
|
ccy: {
|
|
3670
3670
|
type: "string",
|
|
3671
|
-
description: "
|
|
3671
|
+
description: "e.g. ETH"
|
|
3672
3672
|
},
|
|
3673
3673
|
after: {
|
|
3674
3674
|
type: "string",
|
|
3675
|
-
description: "
|
|
3675
|
+
description: "Cursor: results older than this order ID."
|
|
3676
3676
|
},
|
|
3677
3677
|
before: {
|
|
3678
3678
|
type: "string",
|
|
3679
|
-
description: "
|
|
3679
|
+
description: "Cursor: results newer than this order ID."
|
|
3680
3680
|
},
|
|
3681
3681
|
limit: {
|
|
3682
3682
|
type: "string",
|
|
3683
|
-
description: "Max results
|
|
3683
|
+
description: "Max results (default 100, max 100)."
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
3686
|
},
|
|
@@ -5715,7 +5715,7 @@ function registerSpotTradeTools() {
|
|
|
5715
5715
|
{
|
|
5716
5716
|
name: "spot_place_order",
|
|
5717
5717
|
module: "spot",
|
|
5718
|
-
description: "Place a spot order.
|
|
5718
|
+
description: "Place a spot order. Attach TP/SL via tpTriggerPx/slTriggerPx. [CAUTION] Executes real trades.",
|
|
5719
5719
|
isWrite: true,
|
|
5720
5720
|
inputSchema: {
|
|
5721
5721
|
type: "object",
|
|
@@ -5727,7 +5727,7 @@ function registerSpotTradeTools() {
|
|
|
5727
5727
|
tdMode: {
|
|
5728
5728
|
type: "string",
|
|
5729
5729
|
enum: ["cash", "cross", "isolated"],
|
|
5730
|
-
description: "cash=regular spot
|
|
5730
|
+
description: "cash=regular spot, cross/isolated=margin"
|
|
5731
5731
|
},
|
|
5732
5732
|
side: {
|
|
5733
5733
|
type: "string",
|
|
@@ -5740,7 +5740,7 @@ function registerSpotTradeTools() {
|
|
|
5740
5740
|
},
|
|
5741
5741
|
sz: {
|
|
5742
5742
|
type: "string",
|
|
5743
|
-
description: "Buy market: quote amount
|
|
5743
|
+
description: "Buy market: quote amount, all others: base amount"
|
|
5744
5744
|
},
|
|
5745
5745
|
px: {
|
|
5746
5746
|
type: "string",
|
|
@@ -5752,19 +5752,19 @@ function registerSpotTradeTools() {
|
|
|
5752
5752
|
},
|
|
5753
5753
|
tpTriggerPx: {
|
|
5754
5754
|
type: "string",
|
|
5755
|
-
description: "TP trigger price
|
|
5755
|
+
description: "TP trigger price"
|
|
5756
5756
|
},
|
|
5757
5757
|
tpOrdPx: {
|
|
5758
5758
|
type: "string",
|
|
5759
|
-
description: "TP order price
|
|
5759
|
+
description: "TP order price, -1=market"
|
|
5760
5760
|
},
|
|
5761
5761
|
slTriggerPx: {
|
|
5762
5762
|
type: "string",
|
|
5763
|
-
description: "SL trigger price
|
|
5763
|
+
description: "SL trigger price"
|
|
5764
5764
|
},
|
|
5765
5765
|
slOrdPx: {
|
|
5766
5766
|
type: "string",
|
|
5767
|
-
description: "SL order price
|
|
5767
|
+
description: "SL order price, -1=market"
|
|
5768
5768
|
}
|
|
5769
5769
|
},
|
|
5770
5770
|
required: ["instId", "tdMode", "side", "ordType", "sz"]
|
|
@@ -5793,7 +5793,7 @@ function registerSpotTradeTools() {
|
|
|
5793
5793
|
{
|
|
5794
5794
|
name: "spot_cancel_order",
|
|
5795
5795
|
module: "spot",
|
|
5796
|
-
description: "Cancel an unfilled spot order
|
|
5796
|
+
description: "Cancel an unfilled spot order.",
|
|
5797
5797
|
isWrite: true,
|
|
5798
5798
|
inputSchema: {
|
|
5799
5799
|
type: "object",
|
|
@@ -5806,8 +5806,7 @@ function registerSpotTradeTools() {
|
|
|
5806
5806
|
type: "string"
|
|
5807
5807
|
},
|
|
5808
5808
|
clOrdId: {
|
|
5809
|
-
type: "string"
|
|
5810
|
-
description: "Client order ID"
|
|
5809
|
+
type: "string"
|
|
5811
5810
|
}
|
|
5812
5811
|
},
|
|
5813
5812
|
required: ["instId"]
|
|
@@ -5839,24 +5838,22 @@ function registerSpotTradeTools() {
|
|
|
5839
5838
|
description: "e.g. BTC-USDT"
|
|
5840
5839
|
},
|
|
5841
5840
|
ordId: {
|
|
5842
|
-
type: "string"
|
|
5843
|
-
description: "Order ID"
|
|
5841
|
+
type: "string"
|
|
5844
5842
|
},
|
|
5845
5843
|
clOrdId: {
|
|
5846
|
-
type: "string"
|
|
5847
|
-
description: "Client order ID"
|
|
5844
|
+
type: "string"
|
|
5848
5845
|
},
|
|
5849
5846
|
newSz: {
|
|
5850
5847
|
type: "string",
|
|
5851
|
-
description: "New
|
|
5848
|
+
description: "New size in base currency"
|
|
5852
5849
|
},
|
|
5853
5850
|
newPx: {
|
|
5854
5851
|
type: "string",
|
|
5855
|
-
description: "New
|
|
5852
|
+
description: "New price"
|
|
5856
5853
|
},
|
|
5857
5854
|
newClOrdId: {
|
|
5858
5855
|
type: "string",
|
|
5859
|
-
description: "
|
|
5856
|
+
description: "Replacement client order ID"
|
|
5860
5857
|
}
|
|
5861
5858
|
},
|
|
5862
5859
|
required: ["instId"]
|
|
@@ -5881,15 +5878,14 @@ function registerSpotTradeTools() {
|
|
|
5881
5878
|
{
|
|
5882
5879
|
name: "spot_get_orders",
|
|
5883
5880
|
module: "spot",
|
|
5884
|
-
description: "Query spot
|
|
5881
|
+
description: "Query spot orders. status: open(active)|history(7d)|archive(3mo).",
|
|
5885
5882
|
isWrite: false,
|
|
5886
5883
|
inputSchema: {
|
|
5887
5884
|
type: "object",
|
|
5888
5885
|
properties: {
|
|
5889
5886
|
status: {
|
|
5890
5887
|
type: "string",
|
|
5891
|
-
enum: ["open", "history", "archive"]
|
|
5892
|
-
description: "open=active, history=7d, archive=3mo"
|
|
5888
|
+
enum: ["open", "history", "archive"]
|
|
5893
5889
|
},
|
|
5894
5890
|
instId: {
|
|
5895
5891
|
type: "string",
|
|
@@ -5905,11 +5901,11 @@ function registerSpotTradeTools() {
|
|
|
5905
5901
|
},
|
|
5906
5902
|
after: {
|
|
5907
5903
|
type: "string",
|
|
5908
|
-
description: "
|
|
5904
|
+
description: "Cursor: older than this order ID"
|
|
5909
5905
|
},
|
|
5910
5906
|
before: {
|
|
5911
5907
|
type: "string",
|
|
5912
|
-
description: "
|
|
5908
|
+
description: "Cursor: newer than this order ID"
|
|
5913
5909
|
},
|
|
5914
5910
|
begin: {
|
|
5915
5911
|
type: "string",
|
|
@@ -5950,7 +5946,7 @@ function registerSpotTradeTools() {
|
|
|
5950
5946
|
{
|
|
5951
5947
|
name: "spot_place_algo_order",
|
|
5952
5948
|
module: "spot",
|
|
5953
|
-
description: "Place a spot algo order: TP/SL (conditional/oco) or trailing stop (move_order_stop).
|
|
5949
|
+
description: "Place a spot algo order: TP/SL (conditional/oco) or trailing stop (move_order_stop). [CAUTION] Executes real trades.",
|
|
5954
5950
|
isWrite: true,
|
|
5955
5951
|
inputSchema: {
|
|
5956
5952
|
type: "object",
|
|
@@ -5962,7 +5958,7 @@ function registerSpotTradeTools() {
|
|
|
5962
5958
|
tdMode: {
|
|
5963
5959
|
type: "string",
|
|
5964
5960
|
enum: ["cash", "cross", "isolated"],
|
|
5965
|
-
description: "cash
|
|
5961
|
+
description: "cash(default)=spot, cross/isolated=margin"
|
|
5966
5962
|
},
|
|
5967
5963
|
side: {
|
|
5968
5964
|
type: "string",
|
|
@@ -5971,7 +5967,7 @@ function registerSpotTradeTools() {
|
|
|
5971
5967
|
ordType: {
|
|
5972
5968
|
type: "string",
|
|
5973
5969
|
enum: ["conditional", "oco", "move_order_stop"],
|
|
5974
|
-
description: "conditional=single TP/SL
|
|
5970
|
+
description: "conditional=single TP/SL, oco=TP+SL pair, move_order_stop=trailing stop"
|
|
5975
5971
|
},
|
|
5976
5972
|
sz: {
|
|
5977
5973
|
type: "string",
|
|
@@ -5983,7 +5979,7 @@ function registerSpotTradeTools() {
|
|
|
5983
5979
|
},
|
|
5984
5980
|
tpOrdPx: {
|
|
5985
5981
|
type: "string",
|
|
5986
|
-
description: "TP order price
|
|
5982
|
+
description: "TP order price, -1=market (conditional/oco only)"
|
|
5987
5983
|
},
|
|
5988
5984
|
slTriggerPx: {
|
|
5989
5985
|
type: "string",
|
|
@@ -5991,19 +5987,19 @@ function registerSpotTradeTools() {
|
|
|
5991
5987
|
},
|
|
5992
5988
|
slOrdPx: {
|
|
5993
5989
|
type: "string",
|
|
5994
|
-
description: "SL order price
|
|
5990
|
+
description: "SL order price, -1=market (conditional/oco only)"
|
|
5995
5991
|
},
|
|
5996
5992
|
callbackRatio: {
|
|
5997
5993
|
type: "string",
|
|
5998
|
-
description: "Callback ratio
|
|
5994
|
+
description: "Callback ratio e.g. 0.01=1%, use ratio or spread (move_order_stop only)"
|
|
5999
5995
|
},
|
|
6000
5996
|
callbackSpread: {
|
|
6001
5997
|
type: "string",
|
|
6002
|
-
description: "Callback spread in price units
|
|
5998
|
+
description: "Callback spread in price units, use ratio or spread (move_order_stop only)"
|
|
6003
5999
|
},
|
|
6004
6000
|
activePx: {
|
|
6005
6001
|
type: "string",
|
|
6006
|
-
description: "Activation price
|
|
6002
|
+
description: "Activation price, trailing starts when market hits this (move_order_stop only)"
|
|
6007
6003
|
}
|
|
6008
6004
|
},
|
|
6009
6005
|
required: ["instId", "side", "ordType", "sz"]
|
|
@@ -6041,12 +6037,12 @@ function registerSpotTradeTools() {
|
|
|
6041
6037
|
type: "object",
|
|
6042
6038
|
properties: {
|
|
6043
6039
|
instId: { type: "string", description: "e.g. BTC-USDT" },
|
|
6044
|
-
algoId: { type: "string"
|
|
6045
|
-
newSz: { type: "string", description: "New
|
|
6040
|
+
algoId: { type: "string" },
|
|
6041
|
+
newSz: { type: "string", description: "New size in base currency" },
|
|
6046
6042
|
newTpTriggerPx: { type: "string", description: "New TP trigger price" },
|
|
6047
|
-
newTpOrdPx: { type: "string", description: "New TP order price
|
|
6043
|
+
newTpOrdPx: { type: "string", description: "New TP order price, -1=market" },
|
|
6048
6044
|
newSlTriggerPx: { type: "string", description: "New SL trigger price" },
|
|
6049
|
-
newSlOrdPx: { type: "string", description: "New SL order price
|
|
6045
|
+
newSlOrdPx: { type: "string", description: "New SL order price, -1=market" }
|
|
6050
6046
|
},
|
|
6051
6047
|
required: ["instId", "algoId"]
|
|
6052
6048
|
},
|
|
@@ -6081,8 +6077,7 @@ function registerSpotTradeTools() {
|
|
|
6081
6077
|
description: "e.g. BTC-USDT"
|
|
6082
6078
|
},
|
|
6083
6079
|
algoId: {
|
|
6084
|
-
type: "string"
|
|
6085
|
-
description: "Algo order ID"
|
|
6080
|
+
type: "string"
|
|
6086
6081
|
}
|
|
6087
6082
|
},
|
|
6088
6083
|
required: ["instId", "algoId"]
|
|
@@ -6113,7 +6108,7 @@ function registerSpotTradeTools() {
|
|
|
6113
6108
|
status: {
|
|
6114
6109
|
type: "string",
|
|
6115
6110
|
enum: ["pending", "history"],
|
|
6116
|
-
description: "pending=active (default)
|
|
6111
|
+
description: "pending=active (default), history=completed"
|
|
6117
6112
|
},
|
|
6118
6113
|
instId: {
|
|
6119
6114
|
type: "string",
|
|
@@ -6122,15 +6117,15 @@ function registerSpotTradeTools() {
|
|
|
6122
6117
|
ordType: {
|
|
6123
6118
|
type: "string",
|
|
6124
6119
|
enum: ["conditional", "oco", "move_order_stop"],
|
|
6125
|
-
description: "Filter by type
|
|
6120
|
+
description: "Filter by type"
|
|
6126
6121
|
},
|
|
6127
6122
|
after: {
|
|
6128
6123
|
type: "string",
|
|
6129
|
-
description: "
|
|
6124
|
+
description: "Cursor: older than this algo ID"
|
|
6130
6125
|
},
|
|
6131
6126
|
before: {
|
|
6132
6127
|
type: "string",
|
|
6133
|
-
description: "
|
|
6128
|
+
description: "Cursor: newer than this algo ID"
|
|
6134
6129
|
},
|
|
6135
6130
|
limit: {
|
|
6136
6131
|
type: "number",
|
|
@@ -6139,7 +6134,7 @@ function registerSpotTradeTools() {
|
|
|
6139
6134
|
state: {
|
|
6140
6135
|
type: "string",
|
|
6141
6136
|
enum: ["effective", "canceled", "order_failed"],
|
|
6142
|
-
description: "Required
|
|
6137
|
+
description: "Required for history. effective=triggered, canceled, order_failed. Default: effective."
|
|
6143
6138
|
}
|
|
6144
6139
|
}
|
|
6145
6140
|
},
|
|
@@ -6182,14 +6177,14 @@ function registerSpotTradeTools() {
|
|
|
6182
6177
|
{
|
|
6183
6178
|
name: "spot_get_fills",
|
|
6184
6179
|
module: "spot",
|
|
6185
|
-
description: "Get spot transaction
|
|
6180
|
+
description: "Get spot transaction fills. archive=false(3d, default)|true(up to 3mo).",
|
|
6186
6181
|
isWrite: false,
|
|
6187
6182
|
inputSchema: {
|
|
6188
6183
|
type: "object",
|
|
6189
6184
|
properties: {
|
|
6190
6185
|
archive: {
|
|
6191
6186
|
type: "boolean",
|
|
6192
|
-
description: "true=up to
|
|
6187
|
+
description: "true=up to 3mo, false=3d (default)"
|
|
6193
6188
|
},
|
|
6194
6189
|
instId: {
|
|
6195
6190
|
type: "string",
|
|
@@ -6201,11 +6196,11 @@ function registerSpotTradeTools() {
|
|
|
6201
6196
|
},
|
|
6202
6197
|
after: {
|
|
6203
6198
|
type: "string",
|
|
6204
|
-
description: "
|
|
6199
|
+
description: "Cursor: older than this bill ID"
|
|
6205
6200
|
},
|
|
6206
6201
|
before: {
|
|
6207
6202
|
type: "string",
|
|
6208
|
-
description: "
|
|
6203
|
+
description: "Cursor: newer than this bill ID"
|
|
6209
6204
|
},
|
|
6210
6205
|
begin: {
|
|
6211
6206
|
type: "string",
|
|
@@ -6245,19 +6240,18 @@ function registerSpotTradeTools() {
|
|
|
6245
6240
|
{
|
|
6246
6241
|
name: "spot_batch_orders",
|
|
6247
6242
|
module: "spot",
|
|
6248
|
-
description: "[CAUTION] Batch place/cancel/amend up to 20 spot orders
|
|
6243
|
+
description: "[CAUTION] Batch place/cancel/amend up to 20 spot orders. action: place|cancel|amend.",
|
|
6249
6244
|
isWrite: true,
|
|
6250
6245
|
inputSchema: {
|
|
6251
6246
|
type: "object",
|
|
6252
6247
|
properties: {
|
|
6253
6248
|
action: {
|
|
6254
6249
|
type: "string",
|
|
6255
|
-
enum: ["place", "cancel", "amend"]
|
|
6256
|
-
description: "place|cancel|amend"
|
|
6250
|
+
enum: ["place", "cancel", "amend"]
|
|
6257
6251
|
},
|
|
6258
6252
|
orders: {
|
|
6259
6253
|
type: "array",
|
|
6260
|
-
description: "Array (max 20). place: {instId,side,ordType,sz,tdMode
|
|
6254
|
+
description: "Array (max 20). place: {instId,side,ordType,sz,tdMode(default cash; use cross for unified/margin accounts),px?,clOrdId?,tpTriggerPx?,tpOrdPx?,slTriggerPx?,slOrdPx?}. cancel: {instId,ordId|clOrdId}. amend: {instId,ordId|clOrdId,newSz?,newPx?}.",
|
|
6261
6255
|
items: {
|
|
6262
6256
|
type: "object"
|
|
6263
6257
|
}
|
|
@@ -6304,7 +6298,7 @@ function registerSpotTradeTools() {
|
|
|
6304
6298
|
{
|
|
6305
6299
|
name: "spot_get_order",
|
|
6306
6300
|
module: "spot",
|
|
6307
|
-
description: "Get details of a single spot order
|
|
6301
|
+
description: "Get details of a single spot order.",
|
|
6308
6302
|
isWrite: false,
|
|
6309
6303
|
inputSchema: {
|
|
6310
6304
|
type: "object",
|
|
@@ -6341,7 +6335,7 @@ function registerSpotTradeTools() {
|
|
|
6341
6335
|
{
|
|
6342
6336
|
name: "spot_batch_amend",
|
|
6343
6337
|
module: "spot",
|
|
6344
|
-
description: "[CAUTION] Batch amend up to 20 unfilled spot orders
|
|
6338
|
+
description: "[CAUTION] Batch amend up to 20 unfilled spot orders.",
|
|
6345
6339
|
isWrite: true,
|
|
6346
6340
|
inputSchema: {
|
|
6347
6341
|
type: "object",
|
|
@@ -6371,7 +6365,7 @@ function registerSpotTradeTools() {
|
|
|
6371
6365
|
{
|
|
6372
6366
|
name: "spot_batch_cancel",
|
|
6373
6367
|
module: "spot",
|
|
6374
|
-
description: "[CAUTION] Batch cancel up to 20 spot orders
|
|
6368
|
+
description: "[CAUTION] Batch cancel up to 20 spot orders.",
|
|
6375
6369
|
isWrite: true,
|
|
6376
6370
|
inputSchema: {
|
|
6377
6371
|
type: "object",
|
|
@@ -7327,7 +7321,7 @@ async function cmdDiagnoseMcp(options = {}) {
|
|
|
7327
7321
|
|
|
7328
7322
|
// src/commands/diagnose.ts
|
|
7329
7323
|
var CLI_VERSION = readCliVersion();
|
|
7330
|
-
var GIT_HASH = true ? "
|
|
7324
|
+
var GIT_HASH = true ? "c00f777" : "dev";
|
|
7331
7325
|
function maskKey2(key) {
|
|
7332
7326
|
if (!key) return "(not set)";
|
|
7333
7327
|
if (key.length <= 8) return "****";
|
|
@@ -11008,7 +11002,7 @@ async function cmdDcdQuoteAndBuy(run, opts) {
|
|
|
11008
11002
|
// src/index.ts
|
|
11009
11003
|
var _require3 = createRequire3(import.meta.url);
|
|
11010
11004
|
var CLI_VERSION2 = _require3("../package.json").version;
|
|
11011
|
-
var GIT_HASH2 = true ? "
|
|
11005
|
+
var GIT_HASH2 = true ? "c00f777" : "dev";
|
|
11012
11006
|
function handleConfigCommand(action, rest, json, lang, force) {
|
|
11013
11007
|
if (action === "init") return cmdConfigInit(lang === "zh" ? "zh" : "en");
|
|
11014
11008
|
if (action === "show") return cmdConfigShow(json);
|