gateio-api 1.4.2 → 1.5.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.
Files changed (51) hide show
  1. package/README.md +3 -2
  2. package/dist/cjs/RestClient.d.ts +184 -117
  3. package/dist/cjs/RestClient.js +287 -105
  4. package/dist/cjs/RestClient.js.map +1 -1
  5. package/dist/cjs/index.d.ts +4 -0
  6. package/dist/cjs/index.js +4 -0
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/types/request/earn.d.ts +10 -0
  9. package/dist/cjs/types/request/futures.d.ts +65 -0
  10. package/dist/cjs/types/request/p2pMerchant.d.ts +108 -0
  11. package/dist/cjs/types/request/p2pMerchant.js +4 -0
  12. package/dist/cjs/types/request/p2pMerchant.js.map +1 -0
  13. package/dist/cjs/types/request/tradfi.d.ts +56 -0
  14. package/dist/cjs/types/request/tradfi.js +4 -0
  15. package/dist/cjs/types/request/tradfi.js.map +1 -0
  16. package/dist/cjs/types/response/earn.d.ts +1 -0
  17. package/dist/cjs/types/response/futures.d.ts +80 -7
  18. package/dist/cjs/types/response/multicollateralLoan.d.ts +4 -0
  19. package/dist/cjs/types/response/p2pMerchant.d.ts +178 -0
  20. package/dist/cjs/types/response/p2pMerchant.js +4 -0
  21. package/dist/cjs/types/response/p2pMerchant.js.map +1 -0
  22. package/dist/cjs/types/response/spot.d.ts +1 -1
  23. package/dist/cjs/types/response/tradfi.d.ts +200 -0
  24. package/dist/cjs/types/response/tradfi.js +4 -0
  25. package/dist/cjs/types/response/tradfi.js.map +1 -0
  26. package/dist/mjs/RestClient.d.ts +184 -117
  27. package/dist/mjs/RestClient.js +287 -105
  28. package/dist/mjs/RestClient.js.map +1 -1
  29. package/dist/mjs/index.d.ts +4 -0
  30. package/dist/mjs/index.js +4 -0
  31. package/dist/mjs/index.js.map +1 -1
  32. package/dist/mjs/types/request/earn.d.ts +10 -0
  33. package/dist/mjs/types/request/futures.d.ts +65 -0
  34. package/dist/mjs/types/request/p2pMerchant.d.ts +108 -0
  35. package/dist/mjs/types/request/p2pMerchant.js +3 -0
  36. package/dist/mjs/types/request/p2pMerchant.js.map +1 -0
  37. package/dist/mjs/types/request/tradfi.d.ts +56 -0
  38. package/dist/mjs/types/request/tradfi.js +3 -0
  39. package/dist/mjs/types/request/tradfi.js.map +1 -0
  40. package/dist/mjs/types/response/earn.d.ts +1 -0
  41. package/dist/mjs/types/response/futures.d.ts +80 -7
  42. package/dist/mjs/types/response/multicollateralLoan.d.ts +4 -0
  43. package/dist/mjs/types/response/p2pMerchant.d.ts +178 -0
  44. package/dist/mjs/types/response/p2pMerchant.js +3 -0
  45. package/dist/mjs/types/response/p2pMerchant.js.map +1 -0
  46. package/dist/mjs/types/response/spot.d.ts +1 -1
  47. package/dist/mjs/types/response/tradfi.d.ts +200 -0
  48. package/dist/mjs/types/response/tradfi.js +3 -0
  49. package/dist/mjs/types/response/tradfi.js.map +1 -0
  50. package/llms.txt +13011 -11849
  51. package/package.json +1 -1
@@ -17,9 +17,11 @@ export * from './types/request/marginuni.js';
17
17
  export * from './types/request/multicollateralLoan.js';
18
18
  export * from './types/request/options.js';
19
19
  export * from './types/request/otc.js';
20
+ export * from './types/request/p2pMerchant.js';
20
21
  export * from './types/request/rebate.js';
21
22
  export * from './types/request/spot.js';
22
23
  export * from './types/request/subaccount.js';
24
+ export * from './types/request/tradfi.js';
23
25
  export * from './types/request/unified.js';
24
26
  export * from './types/request/wallet.js';
25
27
  export * from './types/request/withdrawal.js';
@@ -37,9 +39,11 @@ export * from './types/response/marginuni.js';
37
39
  export * from './types/response/multicollateralLoan.js';
38
40
  export * from './types/response/options.js';
39
41
  export * from './types/response/otc.js';
42
+ export * from './types/response/p2pMerchant.js';
40
43
  export * from './types/response/rebate.js';
41
44
  export * from './types/response/spot.js';
42
45
  export * from './types/response/subaccount.js';
46
+ export * from './types/response/tradfi.js';
43
47
  export * from './types/response/unified.js';
44
48
  export * from './types/response/wallet.js';
45
49
  export * from './types/websockets/client.js';
package/dist/mjs/index.js CHANGED
@@ -18,9 +18,11 @@ export * from './types/request/marginuni.js';
18
18
  export * from './types/request/multicollateralLoan.js';
19
19
  export * from './types/request/options.js';
20
20
  export * from './types/request/otc.js';
21
+ export * from './types/request/p2pMerchant.js';
21
22
  export * from './types/request/rebate.js';
22
23
  export * from './types/request/spot.js';
23
24
  export * from './types/request/subaccount.js';
25
+ export * from './types/request/tradfi.js';
24
26
  export * from './types/request/unified.js';
25
27
  export * from './types/request/wallet.js';
26
28
  export * from './types/request/withdrawal.js';
@@ -39,9 +41,11 @@ export * from './types/response/marginuni.js';
39
41
  export * from './types/response/multicollateralLoan.js';
40
42
  export * from './types/response/options.js';
41
43
  export * from './types/response/otc.js';
44
+ export * from './types/response/p2pMerchant.js';
42
45
  export * from './types/response/rebate.js';
43
46
  export * from './types/response/spot.js';
44
47
  export * from './types/response/subaccount.js';
48
+ export * from './types/response/tradfi.js';
45
49
  export * from './types/response/unified.js';
46
50
  export * from './types/response/wallet.js';
47
51
  // Websockets Types
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,gBAAgB;AAChB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc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interface GetStructuredProductOrdersReq {
14
14
  page?: number;
15
15
  limit?: number;
16
16
  }
17
+ /** Request params for POST /earn/dual/orders */
18
+ export interface PlaceDualInvestmentOrderParams {
19
+ plan_id: string;
20
+ /** Subscription amount. Mutually exclusive with copies. */
21
+ amount: string;
22
+ /** Units. Mutually exclusive with amount. */
23
+ copies?: string;
24
+ /** Custom order info, must start with t- */
25
+ text?: string;
26
+ }
@@ -40,6 +40,10 @@ export interface GetFundingRatesReq {
40
40
  from?: number;
41
41
  to?: number;
42
42
  }
43
+ export interface BatchFundingRatesReq {
44
+ settle: 'btc' | 'usdt';
45
+ contracts: string[];
46
+ }
43
47
  export interface GetLiquidationHistoryReq {
44
48
  settle: 'btc' | 'usdt' | 'usd';
45
49
  contract?: string;
@@ -219,7 +223,68 @@ export interface UpdateFuturesPriceTriggeredOrderReq {
219
223
  contract?: string;
220
224
  size?: number;
221
225
  price?: string;
226
+ /** When fully closing in single-position mode, set true */
227
+ close?: boolean;
222
228
  trigger_price?: string;
223
229
  price_type?: 0 | 1 | 2;
224
230
  auto_size?: string;
225
231
  }
232
+ /** Trail order (autoorder/v1/trail) request types */
233
+ export interface CreateTrailOrderReq {
234
+ settle: 'btc' | 'usdt';
235
+ contract: string;
236
+ amount: string;
237
+ activation_price?: string;
238
+ is_gte?: boolean;
239
+ price_type?: 1 | 2 | 3;
240
+ price_offset?: string;
241
+ reduce_only?: boolean;
242
+ position_related?: boolean;
243
+ text?: string;
244
+ pos_margin_mode?: string;
245
+ position_mode?: string;
246
+ }
247
+ export interface TerminateTrailOrderReq {
248
+ settle: 'btc' | 'usdt';
249
+ id?: number;
250
+ text?: string;
251
+ }
252
+ export interface BatchTerminateTrailOrdersReq {
253
+ settle: 'btc' | 'usdt';
254
+ contract?: string;
255
+ related_position?: 1 | 2;
256
+ }
257
+ export interface GetTrailOrderListReq {
258
+ settle: 'btc' | 'usdt';
259
+ contract?: string;
260
+ is_finished?: boolean;
261
+ start_at?: number;
262
+ end_at?: number;
263
+ page_num?: number;
264
+ page_size?: number;
265
+ sort_by?: 1 | 2;
266
+ hide_cancel?: boolean;
267
+ related_position?: 1 | 2;
268
+ sort_by_trigger?: boolean;
269
+ reduce_only?: 1 | 2;
270
+ side?: 1 | 2;
271
+ }
272
+ export interface GetTrailOrderDetailReq {
273
+ settle: 'btc' | 'usdt';
274
+ id: number;
275
+ }
276
+ export interface UpdateTrailOrderReq {
277
+ settle: 'btc' | 'usdt';
278
+ id: number;
279
+ amount?: string;
280
+ activation_price?: string;
281
+ is_gte_str?: string;
282
+ price_type?: 0 | 1 | 2 | 3;
283
+ price_offset?: string;
284
+ }
285
+ export interface GetTrailOrderChangeLogReq {
286
+ settle: 'btc' | 'usdt';
287
+ id: number;
288
+ page_num?: number;
289
+ page_size?: number;
290
+ }
@@ -0,0 +1,108 @@
1
+ /** P2P Merchant API request types */
2
+ export interface P2PMerchantGetCounterpartyUserInfoReq {
3
+ biz_uid: string;
4
+ }
5
+ export interface P2PMerchantGetMyselfPaymentReq {
6
+ fiat?: string;
7
+ }
8
+ export interface P2PMerchantGetPendingTransactionListReq {
9
+ crypto_currency: string;
10
+ fiat_currency: string;
11
+ order_tab?: string;
12
+ select_type?: string;
13
+ status?: string;
14
+ txid?: number;
15
+ start_time?: number;
16
+ end_time?: number;
17
+ }
18
+ export interface P2PMerchantGetCompletedTransactionListReq {
19
+ crypto_currency: string;
20
+ fiat_currency: string;
21
+ select_type?: string;
22
+ status?: string;
23
+ txid?: number;
24
+ start_time?: number;
25
+ end_time?: number;
26
+ query_dispute?: number;
27
+ page?: number;
28
+ per_page?: number;
29
+ }
30
+ export interface P2PMerchantGetTransactionDetailsReq {
31
+ txid: number;
32
+ channel?: string;
33
+ }
34
+ export interface P2PMerchantConfirmPaymentReq {
35
+ trade_id: string;
36
+ payment_method: string;
37
+ }
38
+ export interface P2PMerchantConfirmReceiptReq {
39
+ trade_id: string;
40
+ }
41
+ export interface P2PMerchantCancelTransactionReq {
42
+ trade_id: string;
43
+ reason_id?: string;
44
+ reason_memo?: string;
45
+ }
46
+ export interface P2PMerchantPlaceBizPushOrderReq {
47
+ currencyType: string;
48
+ exchangeType: string;
49
+ type: string;
50
+ unitPrice: string;
51
+ number: string;
52
+ payType: string;
53
+ minAmount: string;
54
+ maxAmount: string;
55
+ pay_type_json?: string;
56
+ rateFixed?: string;
57
+ oid?: string;
58
+ tierLimit?: string;
59
+ verifiedLimit?: string;
60
+ regTimeLimit?: string;
61
+ advertisersLimit?: string;
62
+ hide_payment?: string;
63
+ expire_min?: string;
64
+ trade_tips?: string;
65
+ auto_reply?: string;
66
+ min_completed_limit?: string;
67
+ max_completed_limit?: string;
68
+ completed_rate_limit?: string;
69
+ user_country_limit?: string;
70
+ user_order_limit?: string;
71
+ rateReferenceId?: string;
72
+ rateOffset?: string;
73
+ float_trend?: string;
74
+ }
75
+ export interface P2PMerchantAdsUpdateStatusReq {
76
+ adv_no: number;
77
+ adv_status: 1 | 3 | 4;
78
+ /** Optional query param */
79
+ trade_type?: string;
80
+ }
81
+ export interface P2PMerchantAdsDetailReq {
82
+ adv_no: string;
83
+ }
84
+ export interface P2PMerchantMyAdsListReq {
85
+ asset?: string;
86
+ fiat_unit?: string;
87
+ trade_type?: string;
88
+ }
89
+ export interface P2PMerchantGetAdsListReq {
90
+ asset: string;
91
+ fiat_unit: string;
92
+ trade_type: string;
93
+ }
94
+ export interface P2PMerchantGetChatsListReq {
95
+ txid: number;
96
+ lastreceived?: number;
97
+ firstreceived?: number;
98
+ }
99
+ export interface P2PMerchantSendChatMessageReq {
100
+ txid: number;
101
+ message: string;
102
+ /** 0=Text, 1=File (video or image). Default 0 */
103
+ type?: 0 | 1;
104
+ }
105
+ export interface P2PMerchantUploadChatFileReq {
106
+ image_content_type: string;
107
+ base64_img: string;
108
+ }
@@ -0,0 +1,3 @@
1
+ /** P2P Merchant API request types */
2
+ export {};
3
+ //# sourceMappingURL=p2pMerchant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p2pMerchant.js","sourceRoot":"","sources":["../../../../src/types/request/p2pMerchant.ts"],"names":[],"mappings":"AAAA,qCAAqC"}
@@ -0,0 +1,56 @@
1
+ /** TradFi API request types */
2
+ export interface TradFiGetSymbolDetailParams {
3
+ symbols: string;
4
+ }
5
+ export interface TradFiGetKlinesParams {
6
+ kline_type: '1m' | '15m' | '1h' | '4h' | '1d' | '7d' | '30d';
7
+ begin_time?: number;
8
+ end_time?: number;
9
+ limit?: number;
10
+ }
11
+ export interface TradFiCreateTransactionReq {
12
+ asset: string;
13
+ change: string;
14
+ type: 'deposit' | 'withdraw';
15
+ }
16
+ export interface TradFiGetTransactionsParams {
17
+ begin_time?: number;
18
+ end_time?: number;
19
+ type?: 'deposit' | 'withdraw' | 'dividend' | 'fill_negative';
20
+ page?: number;
21
+ page_size?: number;
22
+ }
23
+ export interface TradFiCreateOrderReq {
24
+ price: string;
25
+ price_type: 'trigger' | 'market';
26
+ side: 1 | 2;
27
+ symbol: string;
28
+ volume: string;
29
+ price_tp?: string;
30
+ price_sl?: string;
31
+ }
32
+ export interface TradFiModifyOrderReq {
33
+ price: string;
34
+ price_tp?: string | null;
35
+ price_sl?: string | null;
36
+ }
37
+ export interface TradFiModifyPositionReq {
38
+ price_tp?: string | null;
39
+ price_sl?: string | null;
40
+ }
41
+ export interface TradFiClosePositionReq {
42
+ close_type: 1 | 2;
43
+ close_volume?: string | null;
44
+ }
45
+ export interface TradFiGetOrderHistoryParams {
46
+ begin_time?: number;
47
+ end_time?: number;
48
+ symbol?: string;
49
+ side?: 1 | 2;
50
+ }
51
+ export interface TradFiGetPositionHistoryParams {
52
+ begin_time?: number;
53
+ end_time?: number;
54
+ symbol?: string;
55
+ position_dir?: 'Long' | 'Short';
56
+ }
@@ -0,0 +1,3 @@
1
+ /** TradFi API request types */
2
+ export {};
3
+ //# sourceMappingURL=tradfi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tradfi.js","sourceRoot":"","sources":["../../../../src/types/request/tradfi.ts"],"names":[],"mappings":"AAAA,+BAA+B"}
@@ -11,6 +11,7 @@ export interface DualInvestmentProduct {
11
11
  delivery_time: number;
12
12
  min_copies: number;
13
13
  max_copies: number;
14
+ /** @deprecated */
14
15
  per_value: string;
15
16
  apy_display: string;
16
17
  start_time: number;
@@ -65,6 +65,13 @@ export interface FuturesTicker {
65
65
  lowest_size: string;
66
66
  highest_size: string;
67
67
  }
68
+ export interface BatchFundingRatesResponse {
69
+ contract?: string;
70
+ data?: {
71
+ t: number;
72
+ r: string;
73
+ }[];
74
+ }
68
75
  export interface FuturesStats {
69
76
  time: number;
70
77
  lsr_taker: number;
@@ -300,29 +307,43 @@ export interface FuturesContract {
300
307
  taker_fee_rate?: string;
301
308
  order_price_round?: string;
302
309
  mark_price_round?: string;
310
+ order_price_deviate?: string;
311
+ ref_discount_rate?: string;
312
+ ref_rebate_rate?: string;
303
313
  funding_rate?: string;
314
+ funding_rate_indicative?: string;
304
315
  funding_interval?: number;
305
316
  funding_next_apply?: number;
317
+ funding_offset?: number;
318
+ interest_rate?: string;
306
319
  risk_limit_base?: string;
307
320
  risk_limit_step?: string;
308
321
  risk_limit_max?: string;
309
- order_size_min?: number;
310
- order_size_max?: number;
311
- order_price_deviate?: string;
312
- ref_discount_rate?: string;
313
- ref_rebate_rate?: string;
322
+ order_size_min?: string | number;
323
+ order_size_max?: string | number;
314
324
  orderbook_id?: number;
315
325
  trade_id?: number;
316
- trade_size?: number;
317
- position_size?: number;
326
+ trade_size?: string | number;
327
+ position_size?: string | number;
328
+ short_users?: number;
329
+ long_users?: number;
330
+ funding_impact_value?: string;
318
331
  config_change_time?: number;
319
332
  in_delisting?: boolean;
320
333
  orders_limit?: number;
321
334
  enable_bonus?: boolean;
322
335
  enable_credit?: boolean;
336
+ /** When true, contract supports decimal contract size (size field can use decimal string). When false, size only supports integer type. */
337
+ enable_decimal?: boolean;
323
338
  create_time?: number;
339
+ launch_time?: number;
340
+ delisting_time?: number;
341
+ delisted_time?: number;
342
+ status?: string;
324
343
  funding_cap_ratio?: string;
325
344
  funding_rate_limit?: string;
345
+ market_order_slip_ratio?: string;
346
+ market_order_size_max?: string;
326
347
  }
327
348
  export interface FuturesPriceTriggeredOrder {
328
349
  initial: {
@@ -464,3 +485,55 @@ export interface FuturesInsuranceHistory {
464
485
  t: number;
465
486
  b: string;
466
487
  }
488
+ /** Trail order (autoorder/v1/trail) response types */
489
+ export interface TrailOrder {
490
+ id?: number | string;
491
+ user_id?: number | string;
492
+ user?: number | string;
493
+ contract?: string;
494
+ settle?: string;
495
+ amount?: string;
496
+ is_gte?: boolean;
497
+ activation_price?: string;
498
+ price_type?: number;
499
+ price_offset?: string;
500
+ text?: string;
501
+ reduce_only?: boolean;
502
+ position_related?: boolean;
503
+ created_at?: number | string;
504
+ activated_at?: number | string;
505
+ finished_at?: number | string;
506
+ create_time?: number | string;
507
+ active_time?: number | string;
508
+ finish_time?: number | string;
509
+ reason?: string;
510
+ suborder_text?: string;
511
+ is_dual_mode?: boolean;
512
+ trigger_price?: string;
513
+ suborder_id?: number | string;
514
+ side_label?: string;
515
+ original_status?: number;
516
+ status?: string;
517
+ position_side_output?: string;
518
+ updated_at?: number | string;
519
+ extremum_price?: string;
520
+ status_code?: string;
521
+ created_at_precise?: string;
522
+ finished_at_precise?: string;
523
+ activated_at_precise?: string;
524
+ status_label?: string;
525
+ pos_margin_mode?: string;
526
+ position_mode?: string;
527
+ error_label?: string;
528
+ leverage?: string;
529
+ [key: string]: unknown;
530
+ }
531
+ export interface TrailChangeLog {
532
+ updated_at?: number;
533
+ amount?: string;
534
+ is_gte?: boolean;
535
+ activation_price?: string;
536
+ price_type?: number;
537
+ price_offset?: string;
538
+ is_create?: boolean;
539
+ }
@@ -126,6 +126,10 @@ export interface MultiLoanCurrencyQuota {
126
126
  min_quota: string;
127
127
  left_quota: string;
128
128
  left_quote_usdt: string;
129
+ /** Remaining borrow/collateral limit for fixed-term currency */
130
+ left_quota_fixed?: string;
131
+ /** Remaining currency limit for fixed-term converted to USDT */
132
+ left_quote_usdt_fixed?: string;
129
133
  }
130
134
  export interface MultiLoanSupportedCurrencies {
131
135
  loan_currencies: {
@@ -0,0 +1,178 @@
1
+ /** P2P Merchant API response types */
2
+ export interface P2PMerchantApiResp<T> {
3
+ timestamp: number;
4
+ method: string;
5
+ code: number;
6
+ message: string;
7
+ data: T;
8
+ version: string;
9
+ }
10
+ export interface P2PMerchantUserInfo {
11
+ is_self?: boolean;
12
+ user_timest?: string;
13
+ counterparties_num?: number;
14
+ email_verified?: string;
15
+ verified?: string;
16
+ has_phone?: string;
17
+ user_name?: string;
18
+ user_note?: string;
19
+ complete_transactions?: string;
20
+ paid_transactions?: string;
21
+ accepted_transactions?: string;
22
+ transactions_used_time?: string;
23
+ cancelled_used_time_month?: string;
24
+ complete_transactions_month?: string;
25
+ complete_rate_month?: number;
26
+ orders_buy_rate_month?: number;
27
+ is_black?: number;
28
+ is_follow?: number;
29
+ have_traded?: number;
30
+ biz_uid?: string;
31
+ blue_vip?: number;
32
+ work_status?: number;
33
+ registration_days?: number;
34
+ first_trade_days?: number;
35
+ need_replenish?: number;
36
+ merchant_info?: {
37
+ type?: string;
38
+ market?: string;
39
+ };
40
+ online_status?: number;
41
+ work_hours?: Record<string, unknown> | null;
42
+ transactions_month?: number;
43
+ transactions_all?: number;
44
+ trade_versatile?: boolean;
45
+ [key: string]: unknown;
46
+ }
47
+ export interface P2PMerchantCounterpartyUserInfo {
48
+ user_timest?: string;
49
+ email_verified?: string;
50
+ verified?: string;
51
+ has_phone?: string;
52
+ user_name?: string;
53
+ user_note?: string;
54
+ complete_transactions?: string;
55
+ paid_transactions?: string;
56
+ accepted_transactions?: string;
57
+ transactions_used_time?: string;
58
+ cancelled_used_time_month?: string;
59
+ complete_transactions_month?: string;
60
+ complete_rate_month?: number;
61
+ is_follow?: number;
62
+ have_traded?: number;
63
+ biz_uid?: string;
64
+ registration_days?: number;
65
+ first_trade_days?: number;
66
+ trade_versatile?: boolean;
67
+ [key: string]: unknown;
68
+ }
69
+ export interface P2PMerchantPaymentMethod {
70
+ pay_type: string;
71
+ pay_name: string;
72
+ ids: number[];
73
+ list: Record<string, unknown>[];
74
+ }
75
+ export interface P2PMerchantTransactionListItem {
76
+ type_buy?: number;
77
+ timest?: string;
78
+ timest_expire?: string;
79
+ type?: string;
80
+ trade_type?: string;
81
+ timestamp?: number;
82
+ rate?: string;
83
+ amount?: string;
84
+ total?: string;
85
+ txid?: number;
86
+ status?: string;
87
+ order_status?: string;
88
+ [key: string]: unknown;
89
+ }
90
+ export interface P2PMerchantTransactionListData {
91
+ list: P2PMerchantTransactionListItem[];
92
+ trans_time?: {
93
+ od_time?: number;
94
+ }[];
95
+ count: number;
96
+ exported_num: number;
97
+ }
98
+ export interface P2PMerchantTransactionDetails {
99
+ is_sell?: number;
100
+ txid?: number;
101
+ orderid?: number;
102
+ timest?: number;
103
+ last_pay_time?: number;
104
+ remain_pay_time?: number;
105
+ currencyType?: string;
106
+ want_type?: string;
107
+ rate?: string;
108
+ amount?: string;
109
+ total?: string;
110
+ status?: string;
111
+ state?: string;
112
+ its_uid?: string;
113
+ its_nickname?: string;
114
+ its_realname?: string;
115
+ [key: string]: unknown;
116
+ }
117
+ export interface P2PMerchantAdsDetail {
118
+ rate?: string;
119
+ type?: string;
120
+ amount?: string;
121
+ min_amount?: string;
122
+ max_amount?: string;
123
+ total?: string;
124
+ orderid?: number;
125
+ timestamp?: number;
126
+ currencyType?: string;
127
+ want_type?: string;
128
+ status?: string;
129
+ [key: string]: unknown;
130
+ }
131
+ export interface P2PMerchantMyAdsListItem {
132
+ type?: string;
133
+ rate?: string;
134
+ amount?: string;
135
+ total?: string;
136
+ id?: string;
137
+ status?: string;
138
+ currencyType?: string;
139
+ want_type?: string;
140
+ [key: string]: unknown;
141
+ }
142
+ export interface P2PMerchantMyAdsListData {
143
+ lists: P2PMerchantMyAdsListItem[];
144
+ }
145
+ export interface P2PMerchantAdsListItem {
146
+ index?: number;
147
+ asset?: string;
148
+ fiat_unit?: string;
149
+ adv_no?: number;
150
+ price?: string;
151
+ max_single_trans_amount?: string;
152
+ min_single_trans_amount?: string;
153
+ nick_name?: string;
154
+ }
155
+ export interface P2PMerchantChatMessage {
156
+ is_sell?: number;
157
+ msg_type?: number;
158
+ msg?: string;
159
+ username?: string;
160
+ uid?: string;
161
+ timest?: number;
162
+ type?: number;
163
+ pic?: string;
164
+ file_key?: string;
165
+ file_type?: string;
166
+ width?: string;
167
+ height?: string;
168
+ msg_obj?: Record<string, unknown>;
169
+ [key: string]: unknown;
170
+ }
171
+ export interface P2PMerchantChatsListData {
172
+ messages: P2PMerchantChatMessage[];
173
+ has_history?: boolean;
174
+ txid?: number;
175
+ SRVTM?: number;
176
+ order_status?: string;
177
+ memo?: string;
178
+ }
@@ -0,0 +1,3 @@
1
+ /** P2P Merchant API response types */
2
+ export {};
3
+ //# sourceMappingURL=p2pMerchant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p2pMerchant.js","sourceRoot":"","sources":["../../../../src/types/response/p2pMerchant.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
@@ -190,7 +190,7 @@ export interface SpotPriceTriggeredOrder {
190
190
  trigger: {
191
191
  price: string;
192
192
  rule: '>=' | '<=';
193
- expiration: number;
193
+ expiration?: number;
194
194
  };
195
195
  put: {
196
196
  type?: 'limit' | 'market';