gateio-api 1.3.5 → 1.4.1
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/README.md +49 -6
- package/dist/cjs/RestClient.d.ts +448 -0
- package/dist/cjs/RestClient.js +540 -0
- package/dist/cjs/RestClient.js.map +1 -1
- package/dist/cjs/index.d.ts +6 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/BaseRestClient.js +4 -1
- package/dist/cjs/lib/BaseRestClient.js.map +1 -1
- package/dist/cjs/lib/websocket/WsStore.d.ts +1 -1
- package/dist/cjs/lib/websocket/WsStore.js +21 -2
- package/dist/cjs/lib/websocket/WsStore.js.map +1 -1
- package/dist/cjs/types/request/alpha.d.ts +47 -0
- package/dist/cjs/types/request/alpha.js +7 -0
- package/dist/cjs/types/request/alpha.js.map +1 -0
- package/dist/cjs/types/request/crossex.d.ts +146 -0
- package/dist/cjs/types/request/crossex.js +7 -0
- package/dist/cjs/types/request/crossex.js.map +1 -0
- package/dist/cjs/types/request/otc.d.ts +60 -0
- package/dist/cjs/types/request/otc.js +7 -0
- package/dist/cjs/types/request/otc.js.map +1 -0
- package/dist/cjs/types/response/alpha.d.ts +71 -0
- package/dist/cjs/types/response/alpha.js +7 -0
- package/dist/cjs/types/response/alpha.js.map +1 -0
- package/dist/cjs/types/response/crossex.d.ts +325 -0
- package/dist/cjs/types/response/crossex.js +7 -0
- package/dist/cjs/types/response/crossex.js.map +1 -0
- package/dist/cjs/types/response/otc.d.ts +144 -0
- package/dist/cjs/types/response/otc.js +7 -0
- package/dist/cjs/types/response/otc.js.map +1 -0
- package/dist/mjs/RestClient.d.ts +448 -0
- package/dist/mjs/RestClient.js +540 -0
- package/dist/mjs/RestClient.js.map +1 -1
- package/dist/mjs/index.d.ts +6 -0
- package/dist/mjs/index.js +6 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/lib/BaseRestClient.js +4 -1
- package/dist/mjs/lib/BaseRestClient.js.map +1 -1
- package/dist/mjs/lib/websocket/WsStore.d.ts +1 -1
- package/dist/mjs/lib/websocket/WsStore.js +21 -2
- package/dist/mjs/lib/websocket/WsStore.js.map +1 -1
- package/dist/mjs/types/request/alpha.d.ts +47 -0
- package/dist/mjs/types/request/alpha.js +6 -0
- package/dist/mjs/types/request/alpha.js.map +1 -0
- package/dist/mjs/types/request/crossex.d.ts +146 -0
- package/dist/mjs/types/request/crossex.js +6 -0
- package/dist/mjs/types/request/crossex.js.map +1 -0
- package/dist/mjs/types/request/otc.d.ts +60 -0
- package/dist/mjs/types/request/otc.js +6 -0
- package/dist/mjs/types/request/otc.js.map +1 -0
- package/dist/mjs/types/response/alpha.d.ts +71 -0
- package/dist/mjs/types/response/alpha.js +6 -0
- package/dist/mjs/types/response/alpha.js.map +1 -0
- package/dist/mjs/types/response/crossex.d.ts +325 -0
- package/dist/mjs/types/response/crossex.js +6 -0
- package/dist/mjs/types/response/crossex.js.map +1 -0
- package/dist/mjs/types/response/otc.d.ts +144 -0
- package/dist/mjs/types/response/otc.js +6 -0
- package/dist/mjs/types/response/otc.js.map +1 -0
- package/llms.txt +8131 -5712
- package/package.json +1 -1
package/dist/cjs/RestClient.js
CHANGED
|
@@ -3343,6 +3343,546 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
3343
3343
|
getUserSubordinateRelationships(params) {
|
|
3344
3344
|
return this.getPrivate('/rebate/user/sub_relation', params);
|
|
3345
3345
|
}
|
|
3346
|
+
/**==========================================================================================================================
|
|
3347
|
+
* OTC
|
|
3348
|
+
* ==========================================================================================================================
|
|
3349
|
+
*/
|
|
3350
|
+
/**
|
|
3351
|
+
* Fiat and stablecoin quote
|
|
3352
|
+
*
|
|
3353
|
+
* Create fiat and stablecoin quotes, supporting both PAY and GET directions
|
|
3354
|
+
*
|
|
3355
|
+
* @param params Quote parameters
|
|
3356
|
+
* @returns Promise with quote details including rate, amounts, and quote_token
|
|
3357
|
+
*/
|
|
3358
|
+
createOTCQuote(params) {
|
|
3359
|
+
return this.postPrivate('/otc/quote', { body: params });
|
|
3360
|
+
}
|
|
3361
|
+
/**
|
|
3362
|
+
* Create fiat order
|
|
3363
|
+
*
|
|
3364
|
+
* Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp
|
|
3365
|
+
*
|
|
3366
|
+
* @param params Fiat order parameters
|
|
3367
|
+
* @returns Promise with order creation confirmation
|
|
3368
|
+
*/
|
|
3369
|
+
createOTCFiatOrder(params) {
|
|
3370
|
+
return this.postPrivate('/otc/order/create', { body: params });
|
|
3371
|
+
}
|
|
3372
|
+
/**
|
|
3373
|
+
* Create stablecoin order
|
|
3374
|
+
*
|
|
3375
|
+
* Create stablecoin order
|
|
3376
|
+
*
|
|
3377
|
+
* @param params Stablecoin order parameters
|
|
3378
|
+
* @returns Promise with order creation confirmation
|
|
3379
|
+
*/
|
|
3380
|
+
createOTCStablecoinOrder(params) {
|
|
3381
|
+
return this.postPrivate('/otc/stable_coin/order/create', { body: params });
|
|
3382
|
+
}
|
|
3383
|
+
/**
|
|
3384
|
+
* Get user's default bank account information
|
|
3385
|
+
*
|
|
3386
|
+
* Get user's default bank account information for order placement
|
|
3387
|
+
*
|
|
3388
|
+
* @returns Promise with default bank account details
|
|
3389
|
+
*/
|
|
3390
|
+
getOTCUserDefaultBank() {
|
|
3391
|
+
return this.getPrivate('/otc/get_user_def_bank');
|
|
3392
|
+
}
|
|
3393
|
+
/**
|
|
3394
|
+
* Mark fiat order as paid
|
|
3395
|
+
*
|
|
3396
|
+
* Mark fiat order as paid
|
|
3397
|
+
*
|
|
3398
|
+
* @param params Parameters with order_id
|
|
3399
|
+
* @returns Promise with confirmation
|
|
3400
|
+
*/
|
|
3401
|
+
markOTCOrderAsPaid(params) {
|
|
3402
|
+
return this.postPrivate('/otc/order/paid', { body: params });
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Fiat order cancellation
|
|
3406
|
+
*
|
|
3407
|
+
* Cancel fiat order
|
|
3408
|
+
*
|
|
3409
|
+
* @param params Parameters with order_id
|
|
3410
|
+
* @returns Promise with cancellation confirmation
|
|
3411
|
+
*/
|
|
3412
|
+
cancelOTCOrder(params) {
|
|
3413
|
+
return this.postPrivate('/otc/order/cancel', { query: params });
|
|
3414
|
+
}
|
|
3415
|
+
/**
|
|
3416
|
+
* Fiat order list
|
|
3417
|
+
*
|
|
3418
|
+
* Query the fiat order list with filters such as type, currency, time range, and status
|
|
3419
|
+
*
|
|
3420
|
+
* @param params Filter parameters for fiat order list
|
|
3421
|
+
* @returns Promise with paginated fiat order list
|
|
3422
|
+
*/
|
|
3423
|
+
getOTCFiatOrderList(params) {
|
|
3424
|
+
return this.getPrivate('/otc/order/list', params);
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3427
|
+
* Stablecoin order list
|
|
3428
|
+
*
|
|
3429
|
+
* Query stablecoin order list with filtering by currency, time range, status, etc.
|
|
3430
|
+
*
|
|
3431
|
+
* @param params Filter parameters for stablecoin order list
|
|
3432
|
+
* @returns Promise with paginated stablecoin order list
|
|
3433
|
+
*/
|
|
3434
|
+
getOTCStablecoinOrderList(params) {
|
|
3435
|
+
return this.getPrivate('/otc/stable_coin/order/list', params);
|
|
3436
|
+
}
|
|
3437
|
+
/**
|
|
3438
|
+
* Fiat order details
|
|
3439
|
+
*
|
|
3440
|
+
* Query fiat order details
|
|
3441
|
+
*
|
|
3442
|
+
* @param params Parameters with order_id
|
|
3443
|
+
* @returns Promise with fiat order details
|
|
3444
|
+
*/
|
|
3445
|
+
getOTCFiatOrderDetail(params) {
|
|
3446
|
+
return this.getPrivate('/otc/order/detail', params);
|
|
3447
|
+
}
|
|
3448
|
+
/**==========================================================================================================================
|
|
3449
|
+
* CROSSEX
|
|
3450
|
+
* ==========================================================================================================================
|
|
3451
|
+
*/
|
|
3452
|
+
/**
|
|
3453
|
+
* Query Trading Pair Information
|
|
3454
|
+
*
|
|
3455
|
+
* Query trading pair information for cross-exchange trading
|
|
3456
|
+
*
|
|
3457
|
+
* @param params Optional parameters to filter symbols
|
|
3458
|
+
* @returns Promise with array of symbol information
|
|
3459
|
+
*/
|
|
3460
|
+
getCrossExSymbols(params) {
|
|
3461
|
+
return this.get('/crossex/rule/symbols', params);
|
|
3462
|
+
}
|
|
3463
|
+
/**
|
|
3464
|
+
* Query Risk Limit Information
|
|
3465
|
+
*
|
|
3466
|
+
* Query risk limit information for futures/margin trading pairs
|
|
3467
|
+
*
|
|
3468
|
+
* @param params Parameters with required symbols
|
|
3469
|
+
* @returns Promise with array of risk limit information
|
|
3470
|
+
*/
|
|
3471
|
+
getCrossExRiskLimits(params) {
|
|
3472
|
+
return this.get('/crossex/rule/risk_limits', params);
|
|
3473
|
+
}
|
|
3474
|
+
/**
|
|
3475
|
+
* Query Supported Transfer Currencies
|
|
3476
|
+
*
|
|
3477
|
+
* Query supported transfer currencies for cross-exchange
|
|
3478
|
+
*
|
|
3479
|
+
* @param params Optional currency filter
|
|
3480
|
+
* @returns Promise with array of transfer coin information
|
|
3481
|
+
*/
|
|
3482
|
+
getCrossExTransferCoins(params) {
|
|
3483
|
+
return this.get('/crossex/transfers/coin', params);
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* Fund Transfer
|
|
3487
|
+
*
|
|
3488
|
+
* Transfer funds between accounts. Rate limit: 10 requests per 10 seconds
|
|
3489
|
+
*
|
|
3490
|
+
* @param params Transfer parameters
|
|
3491
|
+
* @returns Promise with transfer confirmation
|
|
3492
|
+
*/
|
|
3493
|
+
createCrossExTransfer(params) {
|
|
3494
|
+
return this.postPrivate('/crossex/transfers', { body: params });
|
|
3495
|
+
}
|
|
3496
|
+
/**
|
|
3497
|
+
* Query Fund Transfer History
|
|
3498
|
+
*
|
|
3499
|
+
* Query fund transfer history. Rate Limit: 200 requests per 10 seconds
|
|
3500
|
+
*
|
|
3501
|
+
* @param params Optional filter parameters
|
|
3502
|
+
* @returns Promise with array of transfer history records
|
|
3503
|
+
*/
|
|
3504
|
+
getCrossExTransferHistory(params) {
|
|
3505
|
+
return this.getPrivate('/crossex/transfers', params);
|
|
3506
|
+
}
|
|
3507
|
+
/**
|
|
3508
|
+
* Create an order
|
|
3509
|
+
*
|
|
3510
|
+
* Create an order for cross-exchange trading. Rate Limit: 100 requests per 10 seconds
|
|
3511
|
+
*
|
|
3512
|
+
* @param params Order parameters
|
|
3513
|
+
* @returns Promise with order creation response
|
|
3514
|
+
*/
|
|
3515
|
+
createCrossExOrder(params) {
|
|
3516
|
+
return this.postPrivate('/crossex/orders', { body: params });
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* Cancel Order
|
|
3520
|
+
*
|
|
3521
|
+
* Cancel an order. Rate Limit: 100 requests per 10 seconds
|
|
3522
|
+
*
|
|
3523
|
+
* @param order_id Order ID or Text for Cancel Order
|
|
3524
|
+
* @returns Promise with cancellation confirmation
|
|
3525
|
+
*/
|
|
3526
|
+
cancelCrossExOrder(order_id) {
|
|
3527
|
+
return this.deletePrivate(`/crossex/orders/${order_id}`);
|
|
3528
|
+
}
|
|
3529
|
+
/**
|
|
3530
|
+
* Modify Order
|
|
3531
|
+
*
|
|
3532
|
+
* Modify an existing order. Rate Limit: 100 requests per 10 seconds
|
|
3533
|
+
*
|
|
3534
|
+
* @param order_id Order ID or Text for Modify Order
|
|
3535
|
+
* @param params Modification parameters
|
|
3536
|
+
* @returns Promise with modification confirmation
|
|
3537
|
+
*/
|
|
3538
|
+
modifyCrossExOrder(order_id, params) {
|
|
3539
|
+
return this.putPrivate(`/crossex/orders/${order_id}`, { body: params });
|
|
3540
|
+
}
|
|
3541
|
+
/**
|
|
3542
|
+
* Query order details
|
|
3543
|
+
*
|
|
3544
|
+
* Query order details by order ID or custom text. Rate Limit: 200 requests per 10 seconds
|
|
3545
|
+
*
|
|
3546
|
+
* @param order_id Order ID or custom text
|
|
3547
|
+
* @returns Promise with order details
|
|
3548
|
+
*/
|
|
3549
|
+
getCrossExOrder(order_id) {
|
|
3550
|
+
return this.getPrivate(`/crossex/orders/${order_id}`);
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Flash Swap Inquiry
|
|
3554
|
+
*
|
|
3555
|
+
* Create a flash swap quote. Rate Limit: 100 requests per day
|
|
3556
|
+
*
|
|
3557
|
+
* @param params Quote parameters
|
|
3558
|
+
* @returns Promise with quote details
|
|
3559
|
+
*/
|
|
3560
|
+
createCrossExConvertQuote(params) {
|
|
3561
|
+
return this.postPrivate('/crossex/convert/quote', { body: params });
|
|
3562
|
+
}
|
|
3563
|
+
/**
|
|
3564
|
+
* Flash Swap Transaction
|
|
3565
|
+
*
|
|
3566
|
+
* Execute a flash swap transaction. Rate limit: 10 requests per 10 seconds
|
|
3567
|
+
*
|
|
3568
|
+
* @param params Parameters with quote_id
|
|
3569
|
+
* @returns Promise with transaction confirmation
|
|
3570
|
+
*/
|
|
3571
|
+
createCrossExConvertOrder(params) {
|
|
3572
|
+
return this.postPrivate('/crossex/convert/orders', { body: params });
|
|
3573
|
+
}
|
|
3574
|
+
/**
|
|
3575
|
+
* Modify Account Contract Position Mode and Account Mode
|
|
3576
|
+
*
|
|
3577
|
+
* Modify account settings. Rate Limit: 100 requests per 60 seconds
|
|
3578
|
+
*
|
|
3579
|
+
* @param params Account modification parameters
|
|
3580
|
+
* @returns Promise with update confirmation
|
|
3581
|
+
*/
|
|
3582
|
+
updateCrossExAccount(params) {
|
|
3583
|
+
return this.putPrivate('/crossex/accounts', { body: params });
|
|
3584
|
+
}
|
|
3585
|
+
/**
|
|
3586
|
+
* Query Account Assets
|
|
3587
|
+
*
|
|
3588
|
+
* Query account assets and balances. Rate Limit: 200 requests per 10 seconds
|
|
3589
|
+
*
|
|
3590
|
+
* @param params Optional exchange_type filter
|
|
3591
|
+
* @returns Promise with account information
|
|
3592
|
+
*/
|
|
3593
|
+
getCrossExAccounts(params) {
|
|
3594
|
+
return this.getPrivate('/crossex/accounts', params);
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
* Modify Contract Trading Pair Leverage Multiplier
|
|
3598
|
+
*
|
|
3599
|
+
* Modify leverage for contract trading pair. Rate Limit: 100 requests per 10 seconds
|
|
3600
|
+
*
|
|
3601
|
+
* @param params Leverage modification parameters
|
|
3602
|
+
* @returns Promise with leverage update confirmation
|
|
3603
|
+
*/
|
|
3604
|
+
setCrossExPositionLeverage(params) {
|
|
3605
|
+
return this.postPrivate('/crossex/positions/leverage', { body: params });
|
|
3606
|
+
}
|
|
3607
|
+
/**
|
|
3608
|
+
* Query Contract Trading Pair Leverage Multiplier
|
|
3609
|
+
*
|
|
3610
|
+
* Query leverage for contract trading pairs. Rate Limit: 200 requests per 10 seconds
|
|
3611
|
+
*
|
|
3612
|
+
* @param params Optional symbols filter
|
|
3613
|
+
* @returns Promise with array of leverage information
|
|
3614
|
+
*/
|
|
3615
|
+
getCrossExPositionLeverage(params) {
|
|
3616
|
+
return this.getPrivate('/crossex/positions/leverage', params);
|
|
3617
|
+
}
|
|
3618
|
+
/**
|
|
3619
|
+
* Modify Leveraged Trading Pair Leverage Multiplier
|
|
3620
|
+
*
|
|
3621
|
+
* Modify leverage for margin trading pair. Rate Limit: 100 requests per 10 seconds
|
|
3622
|
+
*
|
|
3623
|
+
* @param params Leverage modification parameters
|
|
3624
|
+
* @returns Promise with leverage update confirmation
|
|
3625
|
+
*/
|
|
3626
|
+
setCrossExMarginPositionLeverage(params) {
|
|
3627
|
+
return this.postPrivate('/crossex/margin_positions/leverage', {
|
|
3628
|
+
body: params,
|
|
3629
|
+
});
|
|
3630
|
+
}
|
|
3631
|
+
/**
|
|
3632
|
+
* Query Leveraged Trading Pair Leverage Multiplier
|
|
3633
|
+
*
|
|
3634
|
+
* Query leverage for margin trading pairs. Rate Limit: 200 requests per 10 seconds
|
|
3635
|
+
*
|
|
3636
|
+
* @param params Optional symbols filter
|
|
3637
|
+
* @returns Promise with array of leverage information
|
|
3638
|
+
*/
|
|
3639
|
+
getCrossExMarginPositionLeverage(params) {
|
|
3640
|
+
return this.getPrivate('/crossex/margin_positions/leverage', params);
|
|
3641
|
+
}
|
|
3642
|
+
/**
|
|
3643
|
+
* Full Close Position
|
|
3644
|
+
*
|
|
3645
|
+
* Fully close a position. Rate Limit: 100 requests per day
|
|
3646
|
+
*
|
|
3647
|
+
* @param params Position close parameters
|
|
3648
|
+
* @returns Promise with close position confirmation
|
|
3649
|
+
*/
|
|
3650
|
+
closeCrossExPosition(params) {
|
|
3651
|
+
return this.deletePrivate('/crossex/position', { body: params });
|
|
3652
|
+
}
|
|
3653
|
+
/**
|
|
3654
|
+
* Query margin asset interest rates
|
|
3655
|
+
*
|
|
3656
|
+
* Query interest rates for margin assets. Rate Limit: 200 requests per 10 seconds
|
|
3657
|
+
*
|
|
3658
|
+
* @param params Optional filter parameters
|
|
3659
|
+
* @returns Promise with array of interest rates
|
|
3660
|
+
*/
|
|
3661
|
+
getCrossExInterestRate(params) {
|
|
3662
|
+
return this.getPrivate('/crossex/interest_rate', params);
|
|
3663
|
+
}
|
|
3664
|
+
/**
|
|
3665
|
+
* Query User Fee Rates
|
|
3666
|
+
*
|
|
3667
|
+
* Query user fee rates. Rate Limit: 200 requests per 10 seconds
|
|
3668
|
+
*
|
|
3669
|
+
* @returns Promise with fee rate information
|
|
3670
|
+
*/
|
|
3671
|
+
getCrossExFeeRate() {
|
|
3672
|
+
return this.getPrivate('/crossex/fee');
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* Query Contract Positions
|
|
3676
|
+
*
|
|
3677
|
+
* Query contract positions. Rate Limit: 200 requests per 10 seconds
|
|
3678
|
+
*
|
|
3679
|
+
* @param params Optional filter parameters
|
|
3680
|
+
* @returns Promise with array of positions
|
|
3681
|
+
*/
|
|
3682
|
+
getCrossExPositions(params) {
|
|
3683
|
+
return this.getPrivate('/crossex/positions', params);
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Query Leveraged Positions
|
|
3687
|
+
*
|
|
3688
|
+
* Query margin/leveraged positions. Rate Limit: 200 requests per 10 seconds
|
|
3689
|
+
*
|
|
3690
|
+
* @param params Optional filter parameters
|
|
3691
|
+
* @returns Promise with array of margin positions
|
|
3692
|
+
*/
|
|
3693
|
+
getCrossExMarginPositions(params) {
|
|
3694
|
+
return this.getPrivate('/crossex/margin_positions', params);
|
|
3695
|
+
}
|
|
3696
|
+
/**
|
|
3697
|
+
* Query ADL Position Reduction Ranking
|
|
3698
|
+
*
|
|
3699
|
+
* Query ADL position reduction ranking. Rate Limit: 200 requests per 10 seconds
|
|
3700
|
+
*
|
|
3701
|
+
* @param params Parameters with required symbol
|
|
3702
|
+
* @returns Promise with array of ADL rankings
|
|
3703
|
+
*/
|
|
3704
|
+
getCrossExAdlRank(params) {
|
|
3705
|
+
return this.getPrivate('/crossex/adl_rank', params);
|
|
3706
|
+
}
|
|
3707
|
+
/**
|
|
3708
|
+
* Query All Current Open Orders
|
|
3709
|
+
*
|
|
3710
|
+
* Query all current open orders. Rate Limit: 200 requests per 10 seconds
|
|
3711
|
+
*
|
|
3712
|
+
* @param params Optional filter parameters
|
|
3713
|
+
* @returns Promise with array of open orders
|
|
3714
|
+
*/
|
|
3715
|
+
getCrossExOpenOrders(params) {
|
|
3716
|
+
return this.getPrivate('/crossex/open_orders', params);
|
|
3717
|
+
}
|
|
3718
|
+
/**
|
|
3719
|
+
* Query order history
|
|
3720
|
+
*
|
|
3721
|
+
* Query historical orders. Rate Limit: 200 requests per 10 seconds
|
|
3722
|
+
*
|
|
3723
|
+
* @param params Optional filter parameters
|
|
3724
|
+
* @returns Promise with array of historical orders
|
|
3725
|
+
*/
|
|
3726
|
+
getCrossExHistoryOrders(params) {
|
|
3727
|
+
return this.getPrivate('/crossex/history_orders', params);
|
|
3728
|
+
}
|
|
3729
|
+
/**
|
|
3730
|
+
* Query Contract Position History
|
|
3731
|
+
*
|
|
3732
|
+
* Query contract position history. Rate Limit: 200 requests per 10 seconds
|
|
3733
|
+
*
|
|
3734
|
+
* @param params Optional filter parameters
|
|
3735
|
+
* @returns Promise with array of historical positions
|
|
3736
|
+
*/
|
|
3737
|
+
getCrossExHistoryPositions(params) {
|
|
3738
|
+
return this.getPrivate('/crossex/history_positions', params);
|
|
3739
|
+
}
|
|
3740
|
+
/**
|
|
3741
|
+
* Query Leveraged Position History
|
|
3742
|
+
*
|
|
3743
|
+
* Query margin position history. Rate Limit: 200 requests per 10 seconds
|
|
3744
|
+
*
|
|
3745
|
+
* @param params Optional filter parameters
|
|
3746
|
+
* @returns Promise with array of historical margin positions
|
|
3747
|
+
*/
|
|
3748
|
+
getCrossExHistoryMarginPositions(params) {
|
|
3749
|
+
return this.getPrivate('/crossex/history_margin_positions', params);
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Query Leveraged Interest Deduction History
|
|
3753
|
+
*
|
|
3754
|
+
* Query margin interest deduction history. Rate Limit: 200 requests per 10 seconds
|
|
3755
|
+
*
|
|
3756
|
+
* @param params Optional filter parameters
|
|
3757
|
+
* @returns Promise with array of interest deduction records
|
|
3758
|
+
*/
|
|
3759
|
+
getCrossExHistoryMarginInterests(params) {
|
|
3760
|
+
return this.getPrivate('/crossex/history_margin_interests', params);
|
|
3761
|
+
}
|
|
3762
|
+
/**
|
|
3763
|
+
* Query filled history
|
|
3764
|
+
*
|
|
3765
|
+
* Query trade execution history. Rate Limit: 200 requests per 10 seconds
|
|
3766
|
+
*
|
|
3767
|
+
* @param params Optional filter parameters
|
|
3768
|
+
* @returns Promise with array of trade records
|
|
3769
|
+
*/
|
|
3770
|
+
getCrossExHistoryTrades(params) {
|
|
3771
|
+
return this.getPrivate('/crossex/history_trades', params);
|
|
3772
|
+
}
|
|
3773
|
+
/**
|
|
3774
|
+
* Query Account Asset Change History
|
|
3775
|
+
*
|
|
3776
|
+
* Query account balance change history. Rate Limit: 200 requests per 10 seconds
|
|
3777
|
+
*
|
|
3778
|
+
* @param params Optional filter parameters
|
|
3779
|
+
* @returns Promise with array of account book records
|
|
3780
|
+
*/
|
|
3781
|
+
getCrossExAccountBook(params) {
|
|
3782
|
+
return this.getPrivate('/crossex/account_book', params);
|
|
3783
|
+
}
|
|
3784
|
+
/**
|
|
3785
|
+
* Query currency discount rate
|
|
3786
|
+
*
|
|
3787
|
+
* Query currency discount rate (for margin currency in isolated exchange mode). Rate Limit: 200 requests per 10 seconds
|
|
3788
|
+
*
|
|
3789
|
+
* @param params Optional filter parameters
|
|
3790
|
+
* @returns Promise with array of coin discount rates
|
|
3791
|
+
*/
|
|
3792
|
+
getCrossExCoinDiscountRate(params) {
|
|
3793
|
+
return this.getPrivate('/crossex/coin_discount_rate', params);
|
|
3794
|
+
}
|
|
3795
|
+
/**==========================================================================================================================
|
|
3796
|
+
* ALPHA
|
|
3797
|
+
* ==========================================================================================================================
|
|
3798
|
+
*/
|
|
3799
|
+
/**
|
|
3800
|
+
* Query position assets
|
|
3801
|
+
*
|
|
3802
|
+
* Query alpha account position assets
|
|
3803
|
+
*
|
|
3804
|
+
* @returns Promise with array of account balances
|
|
3805
|
+
*/
|
|
3806
|
+
getAlphaAccounts() {
|
|
3807
|
+
return this.getPrivate('/alpha/accounts');
|
|
3808
|
+
}
|
|
3809
|
+
/**
|
|
3810
|
+
* Query asset transactions
|
|
3811
|
+
*
|
|
3812
|
+
* Query alpha account transaction history
|
|
3813
|
+
*
|
|
3814
|
+
* @param params Parameters with required from timestamp
|
|
3815
|
+
* @returns Promise with array of transaction records
|
|
3816
|
+
*/
|
|
3817
|
+
getAlphaAccountBook(params) {
|
|
3818
|
+
return this.getPrivate('/alpha/account_book', params);
|
|
3819
|
+
}
|
|
3820
|
+
/**
|
|
3821
|
+
* Alpha Quote API
|
|
3822
|
+
*
|
|
3823
|
+
* Get a quote for alpha trading. Quote is valid for 1 minute. Rate-limited at 10 requests per second per user.
|
|
3824
|
+
*
|
|
3825
|
+
* @param params Quote parameters
|
|
3826
|
+
* @returns Promise with quote details
|
|
3827
|
+
*/
|
|
3828
|
+
createAlphaQuote(params) {
|
|
3829
|
+
return this.postPrivate('/alpha/quote', { body: params });
|
|
3830
|
+
}
|
|
3831
|
+
/**
|
|
3832
|
+
* Alpha Order API
|
|
3833
|
+
*
|
|
3834
|
+
* Create an alpha order. Rate-limited at 5 requests per second per user.
|
|
3835
|
+
*
|
|
3836
|
+
* @param params Order parameters including quote_id
|
|
3837
|
+
* @returns Promise with order details
|
|
3838
|
+
*/
|
|
3839
|
+
createAlphaOrder(params) {
|
|
3840
|
+
return this.postPrivate('/alpha/orders', { body: params });
|
|
3841
|
+
}
|
|
3842
|
+
/**
|
|
3843
|
+
* Alpha Order List API
|
|
3844
|
+
*
|
|
3845
|
+
* Query alpha order list with filters
|
|
3846
|
+
*
|
|
3847
|
+
* @param params Filter parameters
|
|
3848
|
+
* @returns Promise with array of orders
|
|
3849
|
+
*/
|
|
3850
|
+
getAlphaOrders(params) {
|
|
3851
|
+
return this.getPrivate('/alpha/orders', params);
|
|
3852
|
+
}
|
|
3853
|
+
/**
|
|
3854
|
+
* Alpha Single Order Query API
|
|
3855
|
+
*
|
|
3856
|
+
* Query a single alpha order by order ID
|
|
3857
|
+
*
|
|
3858
|
+
* @param params Parameters with order_id
|
|
3859
|
+
* @returns Promise with order details
|
|
3860
|
+
*/
|
|
3861
|
+
getAlphaOrder(params) {
|
|
3862
|
+
return this.getPrivate('/alpha/order', params);
|
|
3863
|
+
}
|
|
3864
|
+
/**
|
|
3865
|
+
* Query currency information
|
|
3866
|
+
*
|
|
3867
|
+
* Query alpha currency information. When currency is provided, returns specific currency info; otherwise returns paginated list.
|
|
3868
|
+
*
|
|
3869
|
+
* @param params Optional filter parameters
|
|
3870
|
+
* @returns Promise with array of currency information
|
|
3871
|
+
*/
|
|
3872
|
+
getAlphaCurrencies(params) {
|
|
3873
|
+
return this.get('/alpha/currencies', params);
|
|
3874
|
+
}
|
|
3875
|
+
/**
|
|
3876
|
+
* Query currency ticker
|
|
3877
|
+
*
|
|
3878
|
+
* Query alpha currency ticker. When currency is provided, returns specific ticker; otherwise returns paginated list.
|
|
3879
|
+
*
|
|
3880
|
+
* @param params Optional filter parameters
|
|
3881
|
+
* @returns Promise with array of ticker information
|
|
3882
|
+
*/
|
|
3883
|
+
getAlphaTickers(params) {
|
|
3884
|
+
return this.get('/alpha/tickers', params);
|
|
3885
|
+
}
|
|
3346
3886
|
}
|
|
3347
3887
|
exports.RestClient = RestClient;
|
|
3348
3888
|
//# sourceMappingURL=RestClient.js.map
|