@0xmonaco/types 1.0.81 → 1.0.83

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.
@@ -2197,7 +2197,7 @@ export interface paths {
2197
2197
  };
2198
2198
  /**
2199
2199
  * Open Interest
2200
- * @description Open interest for a perp market.
2200
+ * @description Gross open interest (longs plus shorts) for a perp market.
2201
2201
  */
2202
2202
  get: operations["get_open_interest"];
2203
2203
  put?: never;
@@ -2329,7 +2329,8 @@ export interface paths {
2329
2329
  * @description Get user orders.
2330
2330
  *
2331
2331
  * Get orders for the authenticated user with pagination and optional
2332
- * filtering by status and trading pair.
2332
+ * filtering by status and trading pair. A TWAP order's slices are not
2333
+ * listed here; read them from ListTwapOrderSlices.
2333
2334
  */
2334
2335
  get: operations["get_orders"];
2335
2336
  put?: never;
@@ -2616,6 +2617,32 @@ export interface paths {
2616
2617
  patch?: never;
2617
2618
  trace?: never;
2618
2619
  };
2620
+ "/api/v1/orders/twap/{twapOrderId}/slices": {
2621
+ parameters: {
2622
+ query?: never;
2623
+ header?: never;
2624
+ path?: never;
2625
+ cookie?: never;
2626
+ };
2627
+ /**
2628
+ * List TWAP order slices
2629
+ * @description List TWAP order slices.
2630
+ *
2631
+ * List the child orders a TWAP parent placed (its slices), each in the
2632
+ * same shape as GetOrder, in placement order. A passive TWAP's reprices and
2633
+ * deadline sweeps are slices too, so a parent can have more slices than
2634
+ * `slicesPlaced`. Resting and finished slices are both listed. Users can
2635
+ * only access their own TWAP orders.
2636
+ */
2637
+ get: operations["list_twap_order_slices"];
2638
+ put?: never;
2639
+ post?: never;
2640
+ delete?: never;
2641
+ options?: never;
2642
+ head?: never;
2643
+ patch?: never;
2644
+ trace?: never;
2645
+ };
2619
2646
  "/api/v1/orders/twap/{twapOrderId}/tca": {
2620
2647
  parameters: {
2621
2648
  query?: never;
@@ -2685,7 +2712,8 @@ export interface paths {
2685
2712
  cookie?: never;
2686
2713
  };
2687
2714
  /**
2688
- * Check custom TraderCode availability
2715
+ * Check custom TraderCode availability (deprecated PitPass path)
2716
+ * @deprecated
2689
2717
  * @description Check custom-handle availability (public, advisory).
2690
2718
  *
2691
2719
  * Unauthenticated as-you-type check for a custom handle: returns `available`
@@ -2693,7 +2721,7 @@ export interface paths {
2693
2721
  * authoritative gate is the atomic claim in SetTraderCode — so a positive
2694
2722
  * result never reserves the handle.
2695
2723
  */
2696
- get: operations["check_trader_code_availability"];
2724
+ get: operations["pitpass_check_trader_code_availability"];
2697
2725
  put?: never;
2698
2726
  post?: never;
2699
2727
  delete?: never;
@@ -2710,7 +2738,8 @@ export interface paths {
2710
2738
  cookie?: never;
2711
2739
  };
2712
2740
  /**
2713
- * Get your TraderCode
2741
+ * Get your TraderCode (deprecated PitPass path)
2742
+ * @deprecated
2714
2743
  * @description Claim your TraderCode.
2715
2744
  *
2716
2745
  * Get your TraderCode.
@@ -2720,7 +2749,7 @@ export interface paths {
2720
2749
  * code always exists for a signed-in wallet — and ensures the backing row so
2721
2750
  * referrals attributed to this wallet have a code to link.
2722
2751
  */
2723
- get: operations["get_my_trader_code"];
2752
+ get: operations["pitpass_get_my_trader_code"];
2724
2753
  put?: never;
2725
2754
  post?: never;
2726
2755
  delete?: never;
@@ -2738,7 +2767,8 @@ export interface paths {
2738
2767
  };
2739
2768
  get?: never;
2740
2769
  /**
2741
- * Claim or edit your custom TraderCode
2770
+ * Claim or edit your custom TraderCode (deprecated PitPass path)
2771
+ * @deprecated
2742
2772
  * @description Claim or edit your custom TraderCode handle.
2743
2773
  *
2744
2774
  * Single claim-or-edit entry point: set the authenticated caller's custom
@@ -2749,10 +2779,11 @@ export interface paths {
2749
2779
  * uniqueness is case-insensitive. Gated by the `custom_trader_codes_enabled`
2750
2780
  * feature flag. Returns the caller's updated TraderCode identity.
2751
2781
  */
2752
- put: operations["set_trader_code"];
2782
+ put: operations["pitpass_set_trader_code"];
2753
2783
  post?: never;
2754
2784
  /**
2755
- * Clear your custom TraderCode
2785
+ * Clear your custom TraderCode (deprecated PitPass path)
2786
+ * @deprecated
2756
2787
  * @description Clear your custom TraderCode handle.
2757
2788
  *
2758
2789
  * Revert the authenticated caller to their wallet-derived default, releasing
@@ -2761,7 +2792,7 @@ export interface paths {
2761
2792
  * rolling-hour rate-limit. Gated by the `custom_trader_codes_enabled` feature
2762
2793
  * flag.
2763
2794
  */
2764
- delete: operations["clear_trader_code"];
2795
+ delete: operations["pitpass_clear_trader_code"];
2765
2796
  options?: never;
2766
2797
  head?: never;
2767
2798
  patch?: never;
@@ -2775,14 +2806,15 @@ export interface paths {
2775
2806
  cookie?: never;
2776
2807
  };
2777
2808
  /**
2778
- * Look up a TraderCode
2809
+ * Look up a TraderCode (deprecated PitPass path)
2810
+ * @deprecated
2779
2811
  * @description Look up a TraderCode (public).
2780
2812
  *
2781
2813
  * Public, unauthenticated lookup used to validate a referral code at signup.
2782
2814
  * The code is a wallet address; returns the normalized code when it resolves
2783
2815
  * to a known wallet. Returns 404 when the code does not resolve to a user.
2784
2816
  */
2785
- get: operations["get_trader_code_info"];
2817
+ get: operations["pitpass_get_trader_code_info"];
2786
2818
  put?: never;
2787
2819
  post?: never;
2788
2820
  delete?: never;
@@ -2799,7 +2831,8 @@ export interface paths {
2799
2831
  cookie?: never;
2800
2832
  };
2801
2833
  /**
2802
- * Get your referral position
2834
+ * Get your referral position (deprecated PitPass path)
2835
+ * @deprecated
2803
2836
  * @description Read your own referral position (self-scoped).
2804
2837
  *
2805
2838
  * Return the authenticated caller's referral position: their referral chain
@@ -2811,7 +2844,7 @@ export interface paths {
2811
2844
  * identified by their public wallet address, never an internal id. An empty
2812
2845
  * `referrer` means the caller was not referred.
2813
2846
  */
2814
- get: operations["get_my_referral_position"];
2847
+ get: operations["pitpass_get_my_referral_position"];
2815
2848
  put?: never;
2816
2849
  post?: never;
2817
2850
  delete?: never;
@@ -2828,7 +2861,8 @@ export interface paths {
2828
2861
  cookie?: never;
2829
2862
  };
2830
2863
  /**
2831
- * Get your referral downline and earnings
2864
+ * Get your referral downline and earnings (deprecated PitPass path)
2865
+ * @deprecated
2832
2866
  * @description Read your own downline earnings (self-scoped).
2833
2867
  *
2834
2868
  * Return who the authenticated caller earns from and how much: one page of
@@ -2841,7 +2875,7 @@ export interface paths {
2841
2875
  * source and referee is identified by their public wallet address, never an
2842
2876
  * internal id.
2843
2877
  */
2844
- get: operations["get_my_referral_downline"];
2878
+ get: operations["pitpass_get_my_referral_downline"];
2845
2879
  put?: never;
2846
2880
  post?: never;
2847
2881
  delete?: never;
@@ -2858,7 +2892,8 @@ export interface paths {
2858
2892
  cookie?: never;
2859
2893
  };
2860
2894
  /**
2861
- * Get one level of your referral tree
2895
+ * Get one level of your referral tree (deprecated PitPass path)
2896
+ * @deprecated
2862
2897
  * @description Read one level of your own referral tree (self-scoped).
2863
2898
  *
2864
2899
  * Return the wallets directly referred by `parent` — the authenticated caller
@@ -2877,7 +2912,7 @@ export interface paths {
2877
2912
  * anyone else's tree. Every node is identified by its public wallet address,
2878
2913
  * never an internal id.
2879
2914
  */
2880
- get: operations["get_my_referral_tree"];
2915
+ get: operations["pitpass_get_my_referral_tree"];
2881
2916
  put?: never;
2882
2917
  post?: never;
2883
2918
  delete?: never;
@@ -2894,7 +2929,8 @@ export interface paths {
2894
2929
  cookie?: never;
2895
2930
  };
2896
2931
  /**
2897
- * Get your rewards balance
2932
+ * Get your rewards balance (deprecated PitPass path)
2933
+ * @deprecated
2898
2934
  * @description Read accrued TraderCodes rewards balance.
2899
2935
  *
2900
2936
  * Return the caller's current rewards-bucket balances across all reward tokens.
@@ -2902,7 +2938,7 @@ export interface paths {
2902
2938
  * them into a tradeable balance. Returns an empty list when no rewards have
2903
2939
  * been earned yet.
2904
2940
  */
2905
- get: operations["get_rewards_balance"];
2941
+ get: operations["pitpass_get_rewards_balance"];
2906
2942
  put?: never;
2907
2943
  post?: never;
2908
2944
  delete?: never;
@@ -2921,17 +2957,18 @@ export interface paths {
2921
2957
  get?: never;
2922
2958
  put?: never;
2923
2959
  /**
2924
- * Transfer rewards into a trading balance
2960
+ * Transfer rewards into a trading balance (deprecated PitPass path)
2961
+ * @deprecated
2925
2962
  * @description Transfer earned rewards into a trading balance.
2926
2963
  *
2927
2964
  * Move spendable TraderCodes reward balance from your rewards bucket into a
2928
2965
  * trading balance under the authenticated application, making it tradeable
2929
2966
  * immediately. Ledger-only (one shared vault + one backend ledger) — no
2930
- * on-chain transaction and no gas. Fails with 402 when the rewards balance is
2967
+ * on-chain transaction and no gas. Fails with 409 when the rewards balance is
2931
2968
  * insufficient. It spends the per-user movement budget withdrawals and
2932
2969
  * collateral transfers share.
2933
2970
  */
2934
- post: operations["transfer_rewards"];
2971
+ post: operations["pitpass_transfer_rewards"];
2935
2972
  delete?: never;
2936
2973
  options?: never;
2937
2974
  head?: never;
@@ -2967,10 +3004,11 @@ export interface paths {
2967
3004
  * @description Close all open positions in a single batch ("panic close").
2968
3005
  *
2969
3006
  * Submits a MARKET reduce-only close for every open position owned by the
2970
- * caller, optionally filtered to a single trading pair. Best-effort and
2971
- * partial: each position closes independently and per-position failures are
2972
- * reported in `results` rather than aborting the batch. Each close draws
2973
- * one item from the risk-reduction rate limit (an empty call draws one).
3007
+ * caller, optionally filtered to one trading pair or a set of them, and to
3008
+ * one side (LONG or SHORT). Best-effort and partial: each position closes
3009
+ * independently and per-position failures are reported in `results` rather
3010
+ * than aborting the batch. Each close draws one item from the
3011
+ * risk-reduction rate limit (an empty call draws one).
2974
3012
  * The first 100 are charged before anything is sent: over budget, the
2975
3013
  * whole call is refused with 429 and nothing is closed. Past 100 open
2976
3014
  * positions the rest are charged 100 at a time as the call reaches them,
@@ -3194,7 +3232,7 @@ export interface paths {
3194
3232
  patch?: never;
3195
3233
  trace?: never;
3196
3234
  };
3197
- "/api/v1/trades/by-id/{tradeId}": {
3235
+ "/api/v1/tradercodes/codes/available": {
3198
3236
  parameters: {
3199
3237
  query?: never;
3200
3238
  header?: never;
@@ -3202,12 +3240,15 @@ export interface paths {
3202
3240
  cookie?: never;
3203
3241
  };
3204
3242
  /**
3205
- * Get Trade by ID
3206
- * @description Get Trade by ID
3243
+ * Check custom TraderCode availability
3244
+ * @description Check custom-handle availability (public, advisory).
3207
3245
  *
3208
- * Retrieve a single trade by its unique identifier.
3246
+ * Unauthenticated as-you-type check for a custom handle: returns `available`
3247
+ * plus, when unavailable, a snake_case `reason` code. Advisory only — the
3248
+ * authoritative gate is the atomic claim in SetTraderCode — so a positive
3249
+ * result never reserves the handle.
3209
3250
  */
3210
- get: operations["get_trade_by_id"];
3251
+ get: operations["check_trader_code_availability"];
3211
3252
  put?: never;
3212
3253
  post?: never;
3213
3254
  delete?: never;
@@ -3216,7 +3257,7 @@ export interface paths {
3216
3257
  patch?: never;
3217
3258
  trace?: never;
3218
3259
  };
3219
- "/api/v1/trades/{tradingPairId}": {
3260
+ "/api/v1/tradercodes/codes/me": {
3220
3261
  parameters: {
3221
3262
  query?: never;
3222
3263
  header?: never;
@@ -3224,12 +3265,17 @@ export interface paths {
3224
3265
  cookie?: never;
3225
3266
  };
3226
3267
  /**
3227
- * Recent Trades
3228
- * @description Recent Trades
3268
+ * Get your TraderCode
3269
+ * @description Claim your TraderCode.
3229
3270
  *
3230
- * Get recent trades for a trading pair sorted by execution time.
3271
+ * Get your TraderCode.
3272
+ *
3273
+ * Return the authenticated caller's TraderCode, which is derived from their
3274
+ * wallet address (rendered `Monaco - <address>` by clients). Never 404s — the
3275
+ * code always exists for a signed-in wallet — and ensures the backing row so
3276
+ * referrals attributed to this wallet have a code to link.
3231
3277
  */
3232
- get: operations["get_trades"];
3278
+ get: operations["get_my_trader_code"];
3233
3279
  put?: never;
3234
3280
  post?: never;
3235
3281
  delete?: never;
@@ -3238,7 +3284,7 @@ export interface paths {
3238
3284
  patch?: never;
3239
3285
  trace?: never;
3240
3286
  };
3241
- "/api/v1/whitelist": {
3287
+ "/api/v1/tradercodes/codes/me/custom": {
3242
3288
  parameters: {
3243
3289
  query?: never;
3244
3290
  header?: never;
@@ -3246,24 +3292,61 @@ export interface paths {
3246
3292
  cookie?: never;
3247
3293
  };
3248
3294
  get?: never;
3249
- put?: never;
3250
3295
  /**
3251
- * Whitelist applications closed
3252
- * @deprecated
3253
- * @description Public whitelist applications are closed.
3296
+ * Claim or edit your custom TraderCode
3297
+ * @description Claim or edit your custom TraderCode handle.
3254
3298
  *
3255
- * Retained for client compatibility. Every decoded submission is rejected with
3256
- * HTTP 403 Forbidden / gRPC PERMISSION_DENIED and no applicant data is changed.
3257
- * Existing applications and administrative approvals remain available.
3299
+ * Single claim-or-edit entry point: set the authenticated caller's custom
3300
+ * vanity handle (a `[A-Za-z0-9_]`, letter-first, 5–20-char name), keeping the
3301
+ * permanent wallet-derived code as the reward identity. The first claim is
3302
+ * free; subsequent changes are rate-limited and release the freed handle into
3303
+ * a cooldown before anyone else can reclaim it. Case is preserved on store;
3304
+ * uniqueness is case-insensitive. Gated by the `custom_trader_codes_enabled`
3305
+ * feature flag. Returns the caller's updated TraderCode identity.
3258
3306
  */
3259
- post: operations["submit_whitelist"];
3307
+ put: operations["set_trader_code"];
3308
+ post?: never;
3309
+ /**
3310
+ * Clear your custom TraderCode
3311
+ * @description Clear your custom TraderCode handle.
3312
+ *
3313
+ * Revert the authenticated caller to their wallet-derived default, releasing
3314
+ * the freed handle into cooldown. A no-op (returns the current default) when
3315
+ * no custom handle is set. Like an edit, a clear counts against the
3316
+ * rolling-hour rate-limit. Gated by the `custom_trader_codes_enabled` feature
3317
+ * flag.
3318
+ */
3319
+ delete: operations["clear_trader_code"];
3320
+ options?: never;
3321
+ head?: never;
3322
+ patch?: never;
3323
+ trace?: never;
3324
+ };
3325
+ "/api/v1/tradercodes/codes/{code}": {
3326
+ parameters: {
3327
+ query?: never;
3328
+ header?: never;
3329
+ path?: never;
3330
+ cookie?: never;
3331
+ };
3332
+ /**
3333
+ * Look up a TraderCode
3334
+ * @description Look up a TraderCode (public).
3335
+ *
3336
+ * Public, unauthenticated lookup used to validate a referral code at signup.
3337
+ * The code is a wallet address; returns the normalized code when it resolves
3338
+ * to a known wallet. Returns 404 when the code does not resolve to a user.
3339
+ */
3340
+ get: operations["get_trader_code_info"];
3341
+ put?: never;
3342
+ post?: never;
3260
3343
  delete?: never;
3261
3344
  options?: never;
3262
3345
  head?: never;
3263
3346
  patch?: never;
3264
3347
  trace?: never;
3265
3348
  };
3266
- "/api/v1/withdrawals": {
3349
+ "/api/v1/tradercodes/referrals/me": {
3267
3350
  parameters: {
3268
3351
  query?: never;
3269
3352
  header?: never;
@@ -3271,36 +3354,58 @@ export interface paths {
3271
3354
  cookie?: never;
3272
3355
  };
3273
3356
  /**
3274
- * List pending withdrawals
3275
- * @description List the caller's pending withdrawals.
3357
+ * Get your referral position
3358
+ * @description Read your own referral position (self-scoped).
3276
3359
  *
3277
- * Authenticated. Returns the caller's withdrawals that are still awaiting
3278
- * on-chain root confirmation (status `pending`) — i.e. those for which the
3279
- * merkle proof, and therefore the executable calldata from GetWithdrawal, is
3280
- * not available yet. Scoped to the authenticated account: only withdrawals
3281
- * owned by the caller's user + application are returned. Newest first, paged.
3360
+ * Return the authenticated caller's referral position: their referral chain
3361
+ * upward (L1, L2 and onward — who referred them, who referred that wallet, and
3362
+ * so on, as many levels as their trades on this client application pay), the
3363
+ * total rewards they have earned, and their most recent reward rows.
3364
+ * Self-scoped — identity comes only from the session, never a path id,
3365
+ * so a caller can only ever read their own chain. Every other user is
3366
+ * identified by their public wallet address, never an internal id. An empty
3367
+ * `referrer` means the caller was not referred.
3282
3368
  */
3283
- get: operations["list_pending_withdrawals"];
3369
+ get: operations["get_my_referral_position"];
3284
3370
  put?: never;
3371
+ post?: never;
3372
+ delete?: never;
3373
+ options?: never;
3374
+ head?: never;
3375
+ patch?: never;
3376
+ trace?: never;
3377
+ };
3378
+ "/api/v1/tradercodes/referrals/me/downline": {
3379
+ parameters: {
3380
+ query?: never;
3381
+ header?: never;
3382
+ path?: never;
3383
+ cookie?: never;
3384
+ };
3285
3385
  /**
3286
- * Initiate withdrawal
3287
- * @description Initiate a withdrawal.
3386
+ * Get your referral downline and earnings
3387
+ * @description Read your own downline earnings (self-scoped).
3288
3388
  *
3289
- * Master accounts with the withdraw permission only. Routes through the
3290
- * matching engine to debit the balance and allocate a `withdrawal_index`,
3291
- * then returns it plus the target vault address. The `calldata` field is
3292
- * empty: `executeWithdrawal` requires the merkle proof, which only exists
3293
- * after the withdrawal's root is confirmed on-chain. Poll GetWithdrawal to
3294
- * obtain the calldata once it is ready.
3389
+ * Return who the authenticated caller earns from and how much: one page of
3390
+ * the earnings-by-source breakdown across every reward level, their L1
3391
+ * direct-referee roster (including referees who have not traded yet), and a
3392
+ * per-level earnings summary that always covers every level and source,
3393
+ * whatever page is requested. `earnings_by_source` is paged (`page_size`,
3394
+ * `page_token`); a request without them gets the first page, not every row.
3395
+ * Self-scoped — identity comes only from the session, never a path id. Every
3396
+ * source and referee is identified by their public wallet address, never an
3397
+ * internal id.
3295
3398
  */
3296
- post: operations["initiate_withdrawal"];
3399
+ get: operations["get_my_referral_downline"];
3400
+ put?: never;
3401
+ post?: never;
3297
3402
  delete?: never;
3298
3403
  options?: never;
3299
3404
  head?: never;
3300
3405
  patch?: never;
3301
3406
  trace?: never;
3302
3407
  };
3303
- "/api/v1/withdrawals/{withdrawalIndex}": {
3408
+ "/api/v1/tradercodes/referrals/me/tree": {
3304
3409
  parameters: {
3305
3410
  query?: never;
3306
3411
  header?: never;
@@ -3308,18 +3413,26 @@ export interface paths {
3308
3413
  cookie?: never;
3309
3414
  };
3310
3415
  /**
3311
- * Get withdrawal
3312
- * @description Fetch a withdrawal's executable calldata by index.
3416
+ * Get one level of your referral tree
3417
+ * @description Read one level of your own referral tree (self-scoped).
3313
3418
  *
3314
- * Public lookup — no auth. Returns the vault address and ABI-encoded
3315
- * `executeWithdrawal(...)` calldata for a previously-initiated
3316
- * `withdrawal_index`. The calldata is bound to the fixed
3317
- * (index, metadata, owner, destination, token, amount) tuple persisted for
3318
- * the withdrawal, so re-fetching it cannot redirect funds. Returns 409 while
3319
- * the withdrawal's root has not been confirmed on-chain yet (proof not
3320
- * available) — clients poll this endpoint until it succeeds.
3419
+ * Return the wallets directly referred by `parent` — the authenticated caller
3420
+ * when `parent` is omitted, otherwise one of the caller's own referees above
3421
+ * the deepest rewarded level — one page at a time, newest first. Each node carries its level
3422
+ * relative to the caller, its parent, how many wallets it has referred (so the
3423
+ * client knows whether it can be expanded), and what the caller has earned
3424
+ * from that wallet's own trades. Expanding a node is another call with
3425
+ * `parent` set to that node's wallet; the tree always lists the caller's
3426
+ * direct referees (L1) and goes as deep as any client application rewards,
3427
+ * at most 10 levels.
3428
+ *
3429
+ * Self-scoped — identity comes only from the session. A `parent` that is not
3430
+ * the caller or a referee the caller can expand returns 404, the same
3431
+ * as a wallet that does not exist, so the endpoint cannot be used to read
3432
+ * anyone else's tree. Every node is identified by its public wallet address,
3433
+ * never an internal id.
3321
3434
  */
3322
- get: operations["get_withdrawal"];
3435
+ get: operations["get_my_referral_tree"];
3323
3436
  put?: never;
3324
3437
  post?: never;
3325
3438
  delete?: never;
@@ -3328,7 +3441,7 @@ export interface paths {
3328
3441
  patch?: never;
3329
3442
  trace?: never;
3330
3443
  };
3331
- "/health": {
3444
+ "/api/v1/tradercodes/rewards/balance": {
3332
3445
  parameters: {
3333
3446
  query?: never;
3334
3447
  header?: never;
@@ -3336,13 +3449,15 @@ export interface paths {
3336
3449
  cookie?: never;
3337
3450
  };
3338
3451
  /**
3339
- * Health check
3340
- * @description Health check.
3452
+ * Get your rewards balance
3453
+ * @description Read accrued TraderCodes rewards balance.
3341
3454
  *
3342
- * Returns the current health status of the API gateway and its connected
3343
- * services. Can be used for monitoring and load balancer health checks.
3455
+ * Return the caller's current rewards-bucket balances across all reward tokens.
3456
+ * Rewards accumulate here as referred users trade; call TransferRewards to move
3457
+ * them into a tradeable balance. Returns an empty list when no rewards have
3458
+ * been earned yet.
3344
3459
  */
3345
- get: operations["health_check"];
3460
+ get: operations["get_rewards_balance"];
3346
3461
  put?: never;
3347
3462
  post?: never;
3348
3463
  delete?: never;
@@ -3351,38 +3466,222 @@ export interface paths {
3351
3466
  patch?: never;
3352
3467
  trace?: never;
3353
3468
  };
3354
- }
3355
- export type webhooks = Record<string, never>;
3356
- export interface components {
3357
- schemas: {
3358
- AccountBalance: {
3359
- /**
3360
- * @description Token contract address
3361
- * @example 0x6a86da986797d59a839d136db490292cd560c131
3362
- */
3363
- token?: string | null;
3364
- /**
3365
- * @description Token symbol
3366
- * @example USDC
3367
- */
3368
- symbol?: string | null;
3369
- /**
3370
- * Format: int32
3371
- * @description Token decimal places
3372
- * @example 6
3373
- */
3374
- decimals?: number | null;
3375
- /**
3376
- * @description Available (unlocked) balance in token units
3377
- * @example 1000.50
3378
- */
3379
- availableBalance?: string | null;
3380
- /**
3381
- * @description Balance locked in open orders
3382
- * @example 50.25
3383
- */
3384
- lockedBalance?: string | null;
3385
- /**
3469
+ "/api/v1/tradercodes/rewards/transfer": {
3470
+ parameters: {
3471
+ query?: never;
3472
+ header?: never;
3473
+ path?: never;
3474
+ cookie?: never;
3475
+ };
3476
+ get?: never;
3477
+ put?: never;
3478
+ /**
3479
+ * Transfer rewards into a trading balance
3480
+ * @description Transfer earned rewards into a trading balance.
3481
+ *
3482
+ * Move spendable TraderCodes reward balance from your rewards bucket into a
3483
+ * trading balance under the authenticated application, making it tradeable
3484
+ * immediately. Ledger-only (one shared vault + one backend ledger) — no
3485
+ * on-chain transaction and no gas. Fails with 409 when the rewards balance is
3486
+ * insufficient. It spends the per-user movement budget withdrawals and
3487
+ * collateral transfers share.
3488
+ */
3489
+ post: operations["transfer_rewards"];
3490
+ delete?: never;
3491
+ options?: never;
3492
+ head?: never;
3493
+ patch?: never;
3494
+ trace?: never;
3495
+ };
3496
+ "/api/v1/trades/by-id/{tradeId}": {
3497
+ parameters: {
3498
+ query?: never;
3499
+ header?: never;
3500
+ path?: never;
3501
+ cookie?: never;
3502
+ };
3503
+ /**
3504
+ * Get Trade by ID
3505
+ * @description Get Trade by ID
3506
+ *
3507
+ * Retrieve a single trade by its unique identifier.
3508
+ */
3509
+ get: operations["get_trade_by_id"];
3510
+ put?: never;
3511
+ post?: never;
3512
+ delete?: never;
3513
+ options?: never;
3514
+ head?: never;
3515
+ patch?: never;
3516
+ trace?: never;
3517
+ };
3518
+ "/api/v1/trades/{tradingPairId}": {
3519
+ parameters: {
3520
+ query?: never;
3521
+ header?: never;
3522
+ path?: never;
3523
+ cookie?: never;
3524
+ };
3525
+ /**
3526
+ * Recent Trades
3527
+ * @description Recent Trades
3528
+ *
3529
+ * Get recent trades for a trading pair sorted by execution time.
3530
+ */
3531
+ get: operations["get_trades"];
3532
+ put?: never;
3533
+ post?: never;
3534
+ delete?: never;
3535
+ options?: never;
3536
+ head?: never;
3537
+ patch?: never;
3538
+ trace?: never;
3539
+ };
3540
+ "/api/v1/whitelist": {
3541
+ parameters: {
3542
+ query?: never;
3543
+ header?: never;
3544
+ path?: never;
3545
+ cookie?: never;
3546
+ };
3547
+ get?: never;
3548
+ put?: never;
3549
+ /**
3550
+ * Whitelist applications closed
3551
+ * @deprecated
3552
+ * @description Public whitelist applications are closed.
3553
+ *
3554
+ * Retained for client compatibility. Every decoded submission is rejected with
3555
+ * HTTP 403 Forbidden / gRPC PERMISSION_DENIED and no applicant data is changed.
3556
+ * Existing applications and administrative approvals remain available.
3557
+ */
3558
+ post: operations["submit_whitelist"];
3559
+ delete?: never;
3560
+ options?: never;
3561
+ head?: never;
3562
+ patch?: never;
3563
+ trace?: never;
3564
+ };
3565
+ "/api/v1/withdrawals": {
3566
+ parameters: {
3567
+ query?: never;
3568
+ header?: never;
3569
+ path?: never;
3570
+ cookie?: never;
3571
+ };
3572
+ /**
3573
+ * List pending withdrawals
3574
+ * @description List the caller's pending withdrawals.
3575
+ *
3576
+ * Authenticated. Returns the caller's withdrawals that are still awaiting
3577
+ * on-chain root confirmation (status `pending`) — i.e. those for which the
3578
+ * merkle proof, and therefore the executable calldata from GetWithdrawal, is
3579
+ * not available yet. Scoped to the authenticated account: only withdrawals
3580
+ * owned by the caller's user + application are returned. Newest first, paged.
3581
+ */
3582
+ get: operations["list_pending_withdrawals"];
3583
+ put?: never;
3584
+ /**
3585
+ * Initiate withdrawal
3586
+ * @description Initiate a withdrawal.
3587
+ *
3588
+ * Master accounts with the withdraw permission only. Routes through the
3589
+ * matching engine to debit the balance and allocate a `withdrawal_index`,
3590
+ * then returns it plus the target vault address. The `calldata` field is
3591
+ * empty: `executeWithdrawal` requires the merkle proof, which only exists
3592
+ * after the withdrawal's root is confirmed on-chain. Poll GetWithdrawal to
3593
+ * obtain the calldata once it is ready.
3594
+ */
3595
+ post: operations["initiate_withdrawal"];
3596
+ delete?: never;
3597
+ options?: never;
3598
+ head?: never;
3599
+ patch?: never;
3600
+ trace?: never;
3601
+ };
3602
+ "/api/v1/withdrawals/{withdrawalIndex}": {
3603
+ parameters: {
3604
+ query?: never;
3605
+ header?: never;
3606
+ path?: never;
3607
+ cookie?: never;
3608
+ };
3609
+ /**
3610
+ * Get withdrawal
3611
+ * @description Fetch a withdrawal's executable calldata by index.
3612
+ *
3613
+ * Public lookup — no auth. Returns the vault address and ABI-encoded
3614
+ * `executeWithdrawal(...)` calldata for a previously-initiated
3615
+ * `withdrawal_index`. The calldata is bound to the fixed
3616
+ * (index, metadata, owner, destination, token, amount) tuple persisted for
3617
+ * the withdrawal, so re-fetching it cannot redirect funds. Returns 409 while
3618
+ * the withdrawal's root has not been confirmed on-chain yet (proof not
3619
+ * available) — clients poll this endpoint until it succeeds.
3620
+ */
3621
+ get: operations["get_withdrawal"];
3622
+ put?: never;
3623
+ post?: never;
3624
+ delete?: never;
3625
+ options?: never;
3626
+ head?: never;
3627
+ patch?: never;
3628
+ trace?: never;
3629
+ };
3630
+ "/health": {
3631
+ parameters: {
3632
+ query?: never;
3633
+ header?: never;
3634
+ path?: never;
3635
+ cookie?: never;
3636
+ };
3637
+ /**
3638
+ * Health check
3639
+ * @description Health check.
3640
+ *
3641
+ * Returns the current health status of the API gateway and its connected
3642
+ * services. Can be used for monitoring and load balancer health checks.
3643
+ */
3644
+ get: operations["health_check"];
3645
+ put?: never;
3646
+ post?: never;
3647
+ delete?: never;
3648
+ options?: never;
3649
+ head?: never;
3650
+ patch?: never;
3651
+ trace?: never;
3652
+ };
3653
+ }
3654
+ export type webhooks = Record<string, never>;
3655
+ export interface components {
3656
+ schemas: {
3657
+ AccountBalance: {
3658
+ /**
3659
+ * @description Token contract address
3660
+ * @example 0x6a86da986797d59a839d136db490292cd560c131
3661
+ */
3662
+ token?: string | null;
3663
+ /**
3664
+ * @description Token symbol
3665
+ * @example USDC
3666
+ */
3667
+ symbol?: string | null;
3668
+ /**
3669
+ * Format: int32
3670
+ * @description Token decimal places
3671
+ * @example 6
3672
+ */
3673
+ decimals?: number | null;
3674
+ /**
3675
+ * @description Available (unlocked) balance in token units
3676
+ * @example 1000.50
3677
+ */
3678
+ availableBalance?: string | null;
3679
+ /**
3680
+ * @description Balance locked in open orders
3681
+ * @example 50.25
3682
+ */
3683
+ lockedBalance?: string | null;
3684
+ /**
3386
3685
  * @description Total balance (available + locked)
3387
3686
  * @example 1050.75
3388
3687
  */
@@ -3780,7 +4079,8 @@ export interface components {
3780
4079
  /**
3781
4080
  * Format: uuid
3782
4081
  * @description Optional trading-pair filter. When set, only open positions on this
3783
- * trading pair are closed; otherwise every open position is closed.
4082
+ * trading pair are closed; otherwise every open position is closed. Cannot
4083
+ * be combined with `trading_pair_ids`.
3784
4084
  */
3785
4085
  tradingPairId?: string | null;
3786
4086
  /**
@@ -3788,6 +4088,22 @@ export interface components {
3788
4088
  * @description Optional slippage tolerance (basis points) applied to each MARKET close.
3789
4089
  */
3790
4090
  slippageToleranceBps?: number | null;
4091
+ /**
4092
+ * @description Optional set of trading-pair UUIDs, at most 256. When non-empty, only
4093
+ * open positions on one of these pairs are closed. An empty or omitted
4094
+ * list applies no pair filter, so every open position is closed. Duplicate
4095
+ * ids are ignored, and an id that matches no open position closes nothing.
4096
+ * Cannot be combined with `trading_pair_id`. Delegated sessions must pass
4097
+ * `trading_pair_id` or a non-empty `trading_pair_ids`.
4098
+ */
4099
+ tradingPairIds?: string[] | null;
4100
+ /**
4101
+ * @description Optional side filter: LONG or SHORT (case-insensitive). When set, only
4102
+ * open positions on that side are closed. It applies on top of the pair
4103
+ * filter, and on its own does not meet the delegated-session pair
4104
+ * requirement.
4105
+ */
4106
+ side?: string | null;
3791
4107
  };
3792
4108
  BatchCloseAllResponse: {
3793
4109
  /**
@@ -4326,6 +4642,16 @@ export interface components {
4326
4642
  * @example 1699800059999
4327
4643
  */
4328
4644
  closeTimestampMs?: string | null;
4645
+ /**
4646
+ * @description One-sided LONG open interest in base-asset units, from the latest sample at or before the candle end. Null when no sample is available.
4647
+ * @example 125.5
4648
+ */
4649
+ openInterestBase?: string | null;
4650
+ /**
4651
+ * @description One-sided LONG open-interest notional in quote-asset units, calculated using the price paired with the same sample as open_interest_base. Present only when the paired base quantity and price are available; otherwise null.
4652
+ * @example 4412600.00
4653
+ */
4654
+ openInterestNotional?: string | null;
4329
4655
  };
4330
4656
  ChallengeRequest: {
4331
4657
  /**
@@ -5627,12 +5953,12 @@ export interface components {
5627
5953
  */
5628
5954
  currentFundingRate?: string | null;
5629
5955
  /**
5630
- * @description Implied rate for the in-progress window. An estimate refreshed on each accepted premium sample (roughly every sample interval plus persistence lag), not a real-time stream; absent when the window has no samples
5956
+ * @description Implied rate for the in-progress window. An estimate refreshed on each accepted premium sample (roughly every sample interval plus persistence lag), not a real-time stream; absent when the window has no samples. A window that ends with too few accepted samples settles at the previous settled rate instead (0 for a market that has never settled one), so the settled rate can differ from this estimate
5631
5957
  * @example 0.00012
5632
5958
  */
5633
5959
  estimatedNextFundingRate?: string | null;
5634
5960
  /**
5635
- * @description Scheduled end of the current funding window (ms epoch string). An estimate, not a guarantee: settlement lands at or shortly after this boundary when the market is alive, and boundaries that pass while the engine is down are skipped, never settled retroactively
5961
+ * @description Scheduled end of the current funding window (ms epoch string), always after the response time: once a window's end passes, this is the following boundary, even before the new window's first sample is recorded. An estimate, not a guarantee: settlement lands at or shortly after this boundary when the market is alive, and boundaries that pass while the engine is down are skipped, never settled retroactively
5636
5962
  * @example 1754006400000
5637
5963
  */
5638
5964
  nextFundingTime?: string | null;
@@ -6013,7 +6339,7 @@ export interface components {
6013
6339
  /** @description Cursor for the next page; empty when there are no more. */
6014
6340
  nextPageToken?: string | null;
6015
6341
  };
6016
- /** @description Latest public open interest for a trading pair. */
6342
+ /** @description Latest public gross open interest (longs plus shorts) for a trading pair. */
6017
6343
  GetOpenInterestResponse: {
6018
6344
  /**
6019
6345
  * Format: uuid
@@ -6022,7 +6348,7 @@ export interface components {
6022
6348
  */
6023
6349
  tradingPairId?: string | null;
6024
6350
  /**
6025
- * @description Current open interest in base-asset units
6351
+ * @description Current gross open interest (longs plus shorts) in base-asset units
6026
6352
  * @example 12345.67
6027
6353
  */
6028
6354
  openInterest?: string | null;
@@ -6032,12 +6358,12 @@ export interface components {
6032
6358
  */
6033
6359
  updatedAt?: string | null;
6034
6360
  /**
6035
- * @description Current open interest in base-asset units
6361
+ * @description Current gross open interest (longs plus shorts) in base-asset units
6036
6362
  * @example 12345.67
6037
6363
  */
6038
6364
  openInterestBase?: string | null;
6039
6365
  /**
6040
- * @description Current open interest notional in quote units
6366
+ * @description Current gross open-interest notional (longs plus shorts) in quote units (openInterestBase x mark price, falling back to the last trade price when no mark is available)
6041
6367
  * @example 1172836500.00
6042
6368
  */
6043
6369
  openInterestNotional?: string | null;
@@ -6116,33 +6442,33 @@ export interface components {
6116
6442
  */
6117
6443
  expirationDate?: string | null;
6118
6444
  /**
6119
- * @description Application taker fee in bps
6120
- * @example 5
6445
+ * @description Application (builder) taker fee this order paid, in quote token units, summed over the fills where it was the taker: each fill's fee as charged, rounded down to the quote token's smallest unit. A replacement order also includes the fills of the order it replaced. 0 on a liquidation order. An amount, not a rate.
6446
+ * @example 0.88
6121
6447
  */
6122
6448
  applicationTakerFee?: string | null;
6123
6449
  /**
6124
- * @description Monaco protocol taker fee in bps
6125
- * @example 10
6450
+ * @description Monaco protocol taker fee this order paid, in quote token units, summed over the fills where it was the taker: each fill's fee as charged, rounded down to the quote token's smallest unit. A replacement order also includes the fills of the order it replaced. A liquidation order carries the liquidation fee it was charged instead. An amount, not a rate.
6451
+ * @example 1.75
6126
6452
  */
6127
6453
  monacoTakerFee?: string | null;
6128
6454
  /**
6129
- * @description Monaco maker rebate in bps (negative)
6130
- * @example -2
6455
+ * @description Monaco maker fee on this order, in quote token units, summed over the fills where it was the maker; negative is a rebate credited to the maker. A replacement order also includes the fills of the order it replaced. An amount, not a rate.
6456
+ * @example -0.35
6131
6457
  */
6132
6458
  monacoMakerRebate?: string | null;
6133
6459
  /**
6134
- * @description Total taker fees charged in quote token
6460
+ * @description Total taker fees charged in quote token (monaco_taker_fee + application_taker_fee)
6135
6461
  * @example 2.63
6136
6462
  */
6137
6463
  totalTakerFees?: string | null;
6138
6464
  /**
6139
- * @description Total amount paid by taker (price * qty + fees)
6465
+ * @description Total amount paid by taker, in quote token units: the filled notional as the ledger booked it (each fill's price * qty, rounded down to the quote token's smallest unit) plus total_taker_fees. A replacement order also includes the fills of the order it replaced.
6140
6466
  * @example 17502.63
6141
6467
  */
6142
6468
  takerTotalPayment?: string | null;
6143
6469
  /**
6144
- * @description Total amount received by maker (price * qty - rebate)
6145
- * @example 17496.50
6470
+ * @description Total amount received by maker, in quote token units: the notional of its maker fills as the ledger booked it (each fill's price * qty, rounded down to the quote token's smallest unit) minus monaco_maker_rebate, so a rebate adds. A replacement order also includes the fills of the order it replaced.
6471
+ * @example 17500.35
6146
6472
  */
6147
6473
  makerTotalReceipt?: string | null;
6148
6474
  /**
@@ -6275,6 +6601,11 @@ export interface components {
6275
6601
  * @example 019aefab-f665-854c-99dc-ced6db9014aa
6276
6602
  */
6277
6603
  conditionalOrderId?: string | null;
6604
+ /**
6605
+ * @description What placed the order: USER (the account itself, including its TP/SL triggers and TWAP slices), LIQUIDATION (the liquidation engine closing the account's position), ADL (an auto-deleveraging close), COPY (the copy trading engine mirroring a leader for one of the account's follows), or SYSTEM. Use it to label a row in order history: a liquidation is a reduce-only IOC limit order, so orderType, timeInForce and reduceOnly alone read the same as an order the user placed. The same labels as the origin key on the order WebSocket events. Present on every book order. Absent on a TWAP parent row and a conditional order row, which are the account's own instructions, not orders an engine placed. A plain string, not a closed set: a value added later must read as an origin this client does not know yet, not fail the response.
6606
+ * @example LIQUIDATION
6607
+ */
6608
+ origin?: string | null;
6278
6609
  };
6279
6610
  /** @description Orderbook snapshot with token metadata and sequence number. */
6280
6611
  GetOrderbookResponse: {
@@ -6378,7 +6709,7 @@ export interface components {
6378
6709
  priceChange24h?: string | null;
6379
6710
  priceChangePercent24h?: string | null;
6380
6711
  /**
6381
- * @description Open interest in base-asset units (legacy alias of openInterestBase)
6712
+ * @description Gross open interest (longs plus shorts) in base-asset units (legacy alias of openInterestBase)
6382
6713
  * @example 12345.67
6383
6714
  */
6384
6715
  openInterest?: string | null;
@@ -6389,12 +6720,12 @@ export interface components {
6389
6720
  marketRegime?: string | null;
6390
6721
  updatedAt?: string | null;
6391
6722
  /**
6392
- * @description Open interest in base-asset units (e.g. BTC)
6723
+ * @description Gross open interest (longs plus shorts) in base-asset units (e.g. BTC)
6393
6724
  * @example 12345.67
6394
6725
  */
6395
6726
  openInterestBase?: string | null;
6396
6727
  /**
6397
- * @description Open interest notional in quote units (openInterestBase x mark price, falling back to the last trade price when no mark is available)
6728
+ * @description Gross open-interest notional (longs plus shorts) in quote units (openInterestBase x mark price, falling back to the last trade price when no mark is available)
6398
6729
  * @example 1172836500.00
6399
6730
  */
6400
6731
  openInterestNotional?: string | null;
@@ -7054,6 +7385,23 @@ export interface components {
7054
7385
  * token.
7055
7386
  */
7056
7387
  nextPageToken?: string | null;
7388
+ /**
7389
+ * Format: uint32
7390
+ * @description Number of trades a full walk returns, hot and archived, with a self-trade counted once; bounded by the server ceiling (10,000), a lower bound when totalCapped is true. Can briefly differ from a walk while the read replica catches up. Absent when tradingPairId filters the request or the count ran out of time: treat absent as unknown.
7391
+ * @example 150
7392
+ */
7393
+ total?: number | null;
7394
+ /**
7395
+ * Format: uint32
7396
+ * @description Number of pages at this pageSize, from the same bounded count as total; a lower bound when totalCapped is true. Absent exactly when total is.
7397
+ * @example 8
7398
+ */
7399
+ totalPages?: number | null;
7400
+ /**
7401
+ * @description True when more than the server ceiling of trades matched, so the count stopped at the ceiling and total/totalPages are a lower bound. False when total is exact, including exactly the ceiling, and when total is absent.
7402
+ * @example false
7403
+ */
7404
+ totalCapped?: boolean | null;
7057
7405
  };
7058
7406
  IndexComponent: {
7059
7407
  provider?: string | null;
@@ -7788,14 +8136,12 @@ export interface components {
7788
8136
  */
7789
8137
  totalPages?: number | null;
7790
8138
  };
7791
- ListTwapOrdersResponse: {
7792
- orders?: components["schemas"]["TwapOrder"][] | null;
8139
+ ListTwapOrderSlicesResponse: {
7793
8140
  /**
7794
- * Format: uint32
7795
- * @description Matching TWAP orders, counted up to a server ceiling of 10,000 and saturating there, so a caller with more than that reads the cap rather than a lifetime total.
7796
- * @example 3
8141
+ * @description The parent's child orders, each as GetOrder returns it; every one carries
8142
+ * the parent's id in `parentOrderId`.
7797
8143
  */
7798
- total?: number | null;
8144
+ slices?: components["schemas"]["GetOrderResponse"][] | null;
7799
8145
  /**
7800
8146
  * Format: uint32
7801
8147
  * @description Items per page
@@ -7804,8 +8150,30 @@ export interface components {
7804
8150
  pageSize?: number | null;
7805
8151
  /**
7806
8152
  * @description Cursor for the next page, minted only when a further page exists — the
7807
- * read over-fetches one row to decide, so there is no "maybe more" state.
7808
- * Empty on the final page (including a full final page, since nothing
8153
+ * read over-fetches one row to decide. Empty on the final page; that empty
8154
+ * token is the definitive end of the walk. Do not feed the empty token back
8155
+ * as `page_token` — an empty input `page_token` restarts the walk.
8156
+ */
8157
+ nextPageToken?: string | null;
8158
+ };
8159
+ ListTwapOrdersResponse: {
8160
+ orders?: components["schemas"]["TwapOrder"][] | null;
8161
+ /**
8162
+ * Format: uint32
8163
+ * @description Matching TWAP orders, counted up to a server ceiling of 10,000 and saturating there, so a caller with more than that reads the cap rather than a lifetime total.
8164
+ * @example 3
8165
+ */
8166
+ total?: number | null;
8167
+ /**
8168
+ * Format: uint32
8169
+ * @description Items per page
8170
+ * @example 20
8171
+ */
8172
+ pageSize?: number | null;
8173
+ /**
8174
+ * @description Cursor for the next page, minted only when a further page exists — the
8175
+ * read over-fetches one row to decide, so there is no "maybe more" state.
8176
+ * Empty on the final page (including a full final page, since nothing
7809
8177
  * follows it).
7810
8178
  * Follow it until it comes back empty; that empty token is the definitive
7811
8179
  * end of the walk, so no extra zero-row request is needed. Do not feed the
@@ -9467,12 +9835,12 @@ export interface components {
9467
9835
  */
9468
9836
  lastFundingTime?: string | null;
9469
9837
  /**
9470
- * @description Open interest in base-asset units (e.g. BTC); null for spot pairs, "0" for a margin pair with no open positions
9838
+ * @description Gross open interest (longs plus shorts) in base-asset units (e.g. BTC); null for spot pairs, "0" for a margin pair with no open positions
9471
9839
  * @example 12345.67
9472
9840
  */
9473
9841
  openInterestBase?: string | null;
9474
9842
  /**
9475
- * @description Open interest notional in quote units (openInterestBase x latest trade price); null for spot pairs. Valued at the pair's latest trade price (a snapshot); the mark-accurate notional lives on getPerpMarketSummary / getOpenInterest
9843
+ * @description Gross open-interest notional (longs plus shorts) in quote units (openInterestBase x latest trade price); null for spot pairs. Valued at the pair's latest trade price (a snapshot); the mark-accurate notional lives on getPerpMarketSummary / getOpenInterest
9476
9844
  * @example 1172836500.00
9477
9845
  */
9478
9846
  openInterestNotional?: string | null;
@@ -9491,6 +9859,11 @@ export interface components {
9491
9859
  * @example 1172836500.00
9492
9860
  */
9493
9861
  openInterestNotionalAvg7d?: string | null;
9862
+ /**
9863
+ * @description Estimated rate for the in-progress funding window, the same value as getFundingState / getPerpMarketSummary estimatedNextFundingRate (a decimal fraction per funding window). An estimate refreshed on each accepted premium sample, not a real-time stream. A window that ends with too few accepted samples settles at the previous settled rate instead (0 for a market that has never settled one), so the settled rate can differ from this estimate. Null for spot pairs and margin pairs whose current window has no samples yet
9864
+ * @example 0.00012
9865
+ */
9866
+ estimatedNextFundingRate?: string | null;
9494
9867
  };
9495
9868
  /** @description One UTC-day bucket in a pair's 7-day snapshot. */
9496
9869
  ScreenerSnapshotPoint: {
@@ -9510,7 +9883,7 @@ export interface components {
9510
9883
  */
9511
9884
  priceChangePercent?: string | null;
9512
9885
  /**
9513
- * @description Arithmetic mean of the valued open-interest notional observations (one per completed UTC minute) in this completed UTC day; published once at least 95% of its 1440 minutes (1368) carry a valued sample, null for spot pairs or below that coverage. Samples use gross open position size x latest trade price in quote units; a minute without a trade price is unvalued, never zero; known zero remains "0". No historical backfill.
9886
+ * @description Arithmetic mean of the valued gross open-interest notional observations (one per completed UTC minute) in this completed UTC day; published once at least 95% of its 1440 minutes (1368) carry a valued sample, null for spot pairs or below that coverage. Samples use gross open position size x latest trade price in quote units; a minute without a trade price is unvalued, never zero; known zero remains "0". No historical backfill.
9514
9887
  * @example 1172836500.00
9515
9888
  */
9516
9889
  openInterestNotionalAvg?: string | null;
@@ -10063,8 +10436,11 @@ export interface components {
10063
10436
  * a take-profit or stop-loss is one call with no window in which the
10064
10437
  * position holds both levels or neither. Fixed-quantity legs never
10065
10438
  * participate — laddered partial exits stack — and a superseded leg's
10066
- * OCO sibling is left active rather than dropped. Legs attached to an entry
10067
- * order are excluded on both sides.
10439
+ * OCO sibling is left active rather than dropped. An entry order's
10440
+ * full-close legs compete for the same slot once armed: the leg set most
10441
+ * recently wins. So an attach retires an armed entry-order leg, leaves one
10442
+ * still pending on an unfilled order alone, and when that order fills its
10443
+ * leg is cancelled instead of armed if this attach came later.
10068
10444
  */
10069
10445
  closePosition?: boolean | null;
10070
10446
  };
@@ -11003,7 +11379,7 @@ export interface components {
11003
11379
  */
11004
11380
  sessionPublicKey: string;
11005
11381
  /**
11006
- * @description Optional PitPass TraderCode captured at signup (e.g. from a `?ref=CODE` link). When a user verifies for the very first time with a valid code, a referral relationship is recorded atomically. Ignored for users who already exist, and silently ignored if the code is unknown — a bad code never blocks sign-in.
11382
+ * @description Optional TraderCode captured at signup (e.g. from a `?ref=CODE` link). When a user verifies for the very first time with a valid code, a referral relationship is recorded atomically. Ignored for users who already exist, and silently ignored if the code is unknown — a bad code never blocks sign-in.
11007
11383
  * @example 0x1234567890abcdef1234567890abcdef12345678
11008
11384
  */
11009
11385
  referralCode?: string | null;
@@ -12204,9 +12580,10 @@ export interface operations {
12204
12580
  * - Non-empty: an opaque cursor from a previous response's
12205
12581
  * `nextPageToken`; results resume immediately after that position.
12206
12582
  *
12207
- * Every walk covers full trade history — hot and archived rows merged. The
12208
- * response carries no item count: this listing's table is too large to count
12209
- * behind a filter. Filters must match the request that produced the token.
12583
+ * Every walk covers full trade history — hot and archived rows merged. An
12584
+ * unfiltered response carries a bounded item count (`total`); a response
12585
+ * filtered by `trading_pair_id` carries none. Filters must match the request
12586
+ * that produced the token.
12210
12587
  */
12211
12588
  pageToken?: string;
12212
12589
  };
@@ -17023,6 +17400,80 @@ export interface operations {
17023
17400
  };
17024
17401
  };
17025
17402
  };
17403
+ list_twap_order_slices: {
17404
+ parameters: {
17405
+ query?: {
17406
+ /** @description Items per page (max 1000) */
17407
+ pageSize?: number;
17408
+ /** @description Sort direction for createdAt: ASC (oldest slice first) or DESC */
17409
+ orderBy?: "ASC" | "DESC";
17410
+ /**
17411
+ * @description Pagination cursor with two states:
17412
+ * - Omitted or empty string (""): start a cursor walk from the first
17413
+ * slice in `order_by` order.
17414
+ * - Non-empty: an opaque cursor from a previous response's
17415
+ * `next_page_token`; results resume immediately after that position.
17416
+ *
17417
+ * Pages are keyset seeks on `(createdAt, id)`. The TWAP order id and
17418
+ * `order_by` must match the request that produced the token; a token
17419
+ * replayed against a different parent or direction is rejected.
17420
+ */
17421
+ pageToken?: string;
17422
+ };
17423
+ header?: never;
17424
+ path: {
17425
+ twapOrderId: string;
17426
+ };
17427
+ cookie?: never;
17428
+ };
17429
+ requestBody?: never;
17430
+ responses: {
17431
+ /** @description OK */
17432
+ 200: {
17433
+ headers: {
17434
+ [name: string]: unknown;
17435
+ };
17436
+ content: {
17437
+ "application/json": components["schemas"]["ListTwapOrderSlicesResponse"];
17438
+ };
17439
+ };
17440
+ /** @description Invalid TWAP order ID format or query parameters */
17441
+ 400: {
17442
+ headers: {
17443
+ [name: string]: unknown;
17444
+ };
17445
+ content?: never;
17446
+ };
17447
+ /** @description Authentication required */
17448
+ 401: {
17449
+ headers: {
17450
+ [name: string]: unknown;
17451
+ };
17452
+ content?: never;
17453
+ };
17454
+ /** @description TWAP order not found */
17455
+ 404: {
17456
+ headers: {
17457
+ [name: string]: unknown;
17458
+ };
17459
+ content?: never;
17460
+ };
17461
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
17462
+ 429: {
17463
+ headers: {
17464
+ [name: string]: unknown;
17465
+ };
17466
+ content?: never;
17467
+ };
17468
+ /** @description Internal server error */
17469
+ 500: {
17470
+ headers: {
17471
+ [name: string]: unknown;
17472
+ };
17473
+ content?: never;
17474
+ };
17475
+ };
17476
+ };
17026
17477
  get_twap_order_tca: {
17027
17478
  parameters: {
17028
17479
  query?: never;
@@ -17207,7 +17658,7 @@ export interface operations {
17207
17658
  };
17208
17659
  };
17209
17660
  };
17210
- check_trader_code_availability: {
17661
+ pitpass_check_trader_code_availability: {
17211
17662
  parameters: {
17212
17663
  query?: {
17213
17664
  code?: string;
@@ -17243,7 +17694,7 @@ export interface operations {
17243
17694
  };
17244
17695
  };
17245
17696
  };
17246
- get_my_trader_code: {
17697
+ pitpass_get_my_trader_code: {
17247
17698
  parameters: {
17248
17699
  query?: never;
17249
17700
  header?: never;
@@ -17284,7 +17735,7 @@ export interface operations {
17284
17735
  };
17285
17736
  };
17286
17737
  };
17287
- set_trader_code: {
17738
+ pitpass_set_trader_code: {
17288
17739
  parameters: {
17289
17740
  query?: never;
17290
17741
  header?: never;
@@ -17350,7 +17801,7 @@ export interface operations {
17350
17801
  };
17351
17802
  };
17352
17803
  };
17353
- clear_trader_code: {
17804
+ pitpass_clear_trader_code: {
17354
17805
  parameters: {
17355
17806
  query?: never;
17356
17807
  header?: never;
@@ -17398,7 +17849,7 @@ export interface operations {
17398
17849
  };
17399
17850
  };
17400
17851
  };
17401
- get_trader_code_info: {
17852
+ pitpass_get_trader_code_info: {
17402
17853
  parameters: {
17403
17854
  query?: never;
17404
17855
  header?: never;
@@ -17435,7 +17886,7 @@ export interface operations {
17435
17886
  };
17436
17887
  };
17437
17888
  };
17438
- get_my_referral_position: {
17889
+ pitpass_get_my_referral_position: {
17439
17890
  parameters: {
17440
17891
  query?: never;
17441
17892
  header?: never;
@@ -17476,7 +17927,7 @@ export interface operations {
17476
17927
  };
17477
17928
  };
17478
17929
  };
17479
- get_my_referral_downline: {
17930
+ pitpass_get_my_referral_downline: {
17480
17931
  parameters: {
17481
17932
  query?: {
17482
17933
  /** @description `earningsBySource` rows per page (max 500) */
@@ -17525,7 +17976,7 @@ export interface operations {
17525
17976
  };
17526
17977
  };
17527
17978
  };
17528
- get_my_referral_tree: {
17979
+ pitpass_get_my_referral_tree: {
17529
17980
  parameters: {
17530
17981
  query?: {
17531
17982
  parent?: string;
@@ -17589,7 +18040,7 @@ export interface operations {
17589
18040
  };
17590
18041
  };
17591
18042
  };
17592
- get_rewards_balance: {
18043
+ pitpass_get_rewards_balance: {
17593
18044
  parameters: {
17594
18045
  query?: never;
17595
18046
  header?: never;
@@ -17630,7 +18081,7 @@ export interface operations {
17630
18081
  };
17631
18082
  };
17632
18083
  };
17633
- transfer_rewards: {
18084
+ pitpass_transfer_rewards: {
17634
18085
  parameters: {
17635
18086
  query?: never;
17636
18087
  header?: never;
@@ -18185,6 +18636,488 @@ export interface operations {
18185
18636
  };
18186
18637
  };
18187
18638
  };
18639
+ check_trader_code_availability: {
18640
+ parameters: {
18641
+ query?: {
18642
+ code?: string;
18643
+ };
18644
+ header?: never;
18645
+ path?: never;
18646
+ cookie?: never;
18647
+ };
18648
+ requestBody?: never;
18649
+ responses: {
18650
+ /** @description OK */
18651
+ 200: {
18652
+ headers: {
18653
+ [name: string]: unknown;
18654
+ };
18655
+ content: {
18656
+ "application/json": components["schemas"]["CheckTraderCodeAvailabilityResponse"];
18657
+ };
18658
+ };
18659
+ /** @description Availability check rate-limit exceeded */
18660
+ 429: {
18661
+ headers: {
18662
+ [name: string]: unknown;
18663
+ };
18664
+ content?: never;
18665
+ };
18666
+ /** @description Internal server error */
18667
+ 500: {
18668
+ headers: {
18669
+ [name: string]: unknown;
18670
+ };
18671
+ content?: never;
18672
+ };
18673
+ };
18674
+ };
18675
+ get_my_trader_code: {
18676
+ parameters: {
18677
+ query?: never;
18678
+ header?: never;
18679
+ path?: never;
18680
+ cookie?: never;
18681
+ };
18682
+ requestBody?: never;
18683
+ responses: {
18684
+ /** @description OK */
18685
+ 200: {
18686
+ headers: {
18687
+ [name: string]: unknown;
18688
+ };
18689
+ content: {
18690
+ "application/json": components["schemas"]["TraderCodeResponse"];
18691
+ };
18692
+ };
18693
+ /** @description Authentication required */
18694
+ 401: {
18695
+ headers: {
18696
+ [name: string]: unknown;
18697
+ };
18698
+ content?: never;
18699
+ };
18700
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
18701
+ 429: {
18702
+ headers: {
18703
+ [name: string]: unknown;
18704
+ };
18705
+ content?: never;
18706
+ };
18707
+ /** @description Internal server error */
18708
+ 500: {
18709
+ headers: {
18710
+ [name: string]: unknown;
18711
+ };
18712
+ content?: never;
18713
+ };
18714
+ };
18715
+ };
18716
+ set_trader_code: {
18717
+ parameters: {
18718
+ query?: never;
18719
+ header?: never;
18720
+ path?: never;
18721
+ cookie?: never;
18722
+ };
18723
+ requestBody: {
18724
+ content: {
18725
+ "application/json": components["schemas"]["SetTraderCodeRequest"];
18726
+ };
18727
+ };
18728
+ responses: {
18729
+ /** @description OK */
18730
+ 200: {
18731
+ headers: {
18732
+ [name: string]: unknown;
18733
+ };
18734
+ content: {
18735
+ "application/json": components["schemas"]["TraderCodeResponse"];
18736
+ };
18737
+ };
18738
+ /** @description Authentication required */
18739
+ 401: {
18740
+ headers: {
18741
+ [name: string]: unknown;
18742
+ };
18743
+ content?: never;
18744
+ };
18745
+ /** @description Custom trader codes are not enabled */
18746
+ 403: {
18747
+ headers: {
18748
+ [name: string]: unknown;
18749
+ };
18750
+ content?: never;
18751
+ };
18752
+ /** @description Handle is taken (case-insensitive) or cooling down */
18753
+ 409: {
18754
+ headers: {
18755
+ [name: string]: unknown;
18756
+ };
18757
+ content?: never;
18758
+ };
18759
+ /** @description Validation failed; body carries a reason code */
18760
+ 422: {
18761
+ headers: {
18762
+ [name: string]: unknown;
18763
+ };
18764
+ content?: never;
18765
+ };
18766
+ /** @description Edit rate-limit exceeded */
18767
+ 429: {
18768
+ headers: {
18769
+ [name: string]: unknown;
18770
+ };
18771
+ content?: never;
18772
+ };
18773
+ /** @description Internal server error */
18774
+ 500: {
18775
+ headers: {
18776
+ [name: string]: unknown;
18777
+ };
18778
+ content?: never;
18779
+ };
18780
+ };
18781
+ };
18782
+ clear_trader_code: {
18783
+ parameters: {
18784
+ query?: never;
18785
+ header?: never;
18786
+ path?: never;
18787
+ cookie?: never;
18788
+ };
18789
+ requestBody?: never;
18790
+ responses: {
18791
+ /** @description OK */
18792
+ 200: {
18793
+ headers: {
18794
+ [name: string]: unknown;
18795
+ };
18796
+ content: {
18797
+ "application/json": components["schemas"]["TraderCodeResponse"];
18798
+ };
18799
+ };
18800
+ /** @description Authentication required */
18801
+ 401: {
18802
+ headers: {
18803
+ [name: string]: unknown;
18804
+ };
18805
+ content?: never;
18806
+ };
18807
+ /** @description Custom trader codes are not enabled */
18808
+ 403: {
18809
+ headers: {
18810
+ [name: string]: unknown;
18811
+ };
18812
+ content?: never;
18813
+ };
18814
+ /** @description Edit rate-limit exceeded */
18815
+ 429: {
18816
+ headers: {
18817
+ [name: string]: unknown;
18818
+ };
18819
+ content?: never;
18820
+ };
18821
+ /** @description Internal server error */
18822
+ 500: {
18823
+ headers: {
18824
+ [name: string]: unknown;
18825
+ };
18826
+ content?: never;
18827
+ };
18828
+ };
18829
+ };
18830
+ get_trader_code_info: {
18831
+ parameters: {
18832
+ query?: never;
18833
+ header?: never;
18834
+ path: {
18835
+ /** @example 0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5 */
18836
+ code: string;
18837
+ };
18838
+ cookie?: never;
18839
+ };
18840
+ requestBody?: never;
18841
+ responses: {
18842
+ /** @description OK */
18843
+ 200: {
18844
+ headers: {
18845
+ [name: string]: unknown;
18846
+ };
18847
+ content: {
18848
+ "application/json": components["schemas"]["GetTraderCodeInfoResponse"];
18849
+ };
18850
+ };
18851
+ /** @description Code not found */
18852
+ 404: {
18853
+ headers: {
18854
+ [name: string]: unknown;
18855
+ };
18856
+ content?: never;
18857
+ };
18858
+ /** @description Internal server error */
18859
+ 500: {
18860
+ headers: {
18861
+ [name: string]: unknown;
18862
+ };
18863
+ content?: never;
18864
+ };
18865
+ };
18866
+ };
18867
+ get_my_referral_position: {
18868
+ parameters: {
18869
+ query?: never;
18870
+ header?: never;
18871
+ path?: never;
18872
+ cookie?: never;
18873
+ };
18874
+ requestBody?: never;
18875
+ responses: {
18876
+ /** @description OK */
18877
+ 200: {
18878
+ headers: {
18879
+ [name: string]: unknown;
18880
+ };
18881
+ content: {
18882
+ "application/json": components["schemas"]["GetMyReferralPositionResponse"];
18883
+ };
18884
+ };
18885
+ /** @description Authentication required */
18886
+ 401: {
18887
+ headers: {
18888
+ [name: string]: unknown;
18889
+ };
18890
+ content?: never;
18891
+ };
18892
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
18893
+ 429: {
18894
+ headers: {
18895
+ [name: string]: unknown;
18896
+ };
18897
+ content?: never;
18898
+ };
18899
+ /** @description Internal server error */
18900
+ 500: {
18901
+ headers: {
18902
+ [name: string]: unknown;
18903
+ };
18904
+ content?: never;
18905
+ };
18906
+ };
18907
+ };
18908
+ get_my_referral_downline: {
18909
+ parameters: {
18910
+ query?: {
18911
+ /** @description `earningsBySource` rows per page (max 500) */
18912
+ pageSize?: number;
18913
+ /**
18914
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit or send an
18915
+ * empty string for the first page.
18916
+ */
18917
+ pageToken?: string;
18918
+ };
18919
+ header?: never;
18920
+ path?: never;
18921
+ cookie?: never;
18922
+ };
18923
+ requestBody?: never;
18924
+ responses: {
18925
+ /** @description OK */
18926
+ 200: {
18927
+ headers: {
18928
+ [name: string]: unknown;
18929
+ };
18930
+ content: {
18931
+ "application/json": components["schemas"]["GetMyReferralDownlineResponse"];
18932
+ };
18933
+ };
18934
+ /** @description Authentication required */
18935
+ 401: {
18936
+ headers: {
18937
+ [name: string]: unknown;
18938
+ };
18939
+ content?: never;
18940
+ };
18941
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
18942
+ 429: {
18943
+ headers: {
18944
+ [name: string]: unknown;
18945
+ };
18946
+ content?: never;
18947
+ };
18948
+ /** @description Internal server error */
18949
+ 500: {
18950
+ headers: {
18951
+ [name: string]: unknown;
18952
+ };
18953
+ content?: never;
18954
+ };
18955
+ };
18956
+ };
18957
+ get_my_referral_tree: {
18958
+ parameters: {
18959
+ query?: {
18960
+ parent?: string;
18961
+ /** @description Nodes per page (max 200) */
18962
+ pageSize?: number;
18963
+ /**
18964
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit or send an
18965
+ * empty string for the first page. Only valid with the same `parent`.
18966
+ */
18967
+ pageToken?: string;
18968
+ };
18969
+ header?: never;
18970
+ path?: never;
18971
+ cookie?: never;
18972
+ };
18973
+ requestBody?: never;
18974
+ responses: {
18975
+ /** @description OK */
18976
+ 200: {
18977
+ headers: {
18978
+ [name: string]: unknown;
18979
+ };
18980
+ content: {
18981
+ "application/json": components["schemas"]["GetMyReferralTreeResponse"];
18982
+ };
18983
+ };
18984
+ /** @description Invalid `parent` wallet address, `pageSize`, or `pageToken` */
18985
+ 400: {
18986
+ headers: {
18987
+ [name: string]: unknown;
18988
+ };
18989
+ content?: never;
18990
+ };
18991
+ /** @description Authentication required */
18992
+ 401: {
18993
+ headers: {
18994
+ [name: string]: unknown;
18995
+ };
18996
+ content?: never;
18997
+ };
18998
+ /** @description `parent` is not the caller or one of the caller's own expandable referees */
18999
+ 404: {
19000
+ headers: {
19001
+ [name: string]: unknown;
19002
+ };
19003
+ content?: never;
19004
+ };
19005
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
19006
+ 429: {
19007
+ headers: {
19008
+ [name: string]: unknown;
19009
+ };
19010
+ content?: never;
19011
+ };
19012
+ /** @description Internal server error */
19013
+ 500: {
19014
+ headers: {
19015
+ [name: string]: unknown;
19016
+ };
19017
+ content?: never;
19018
+ };
19019
+ };
19020
+ };
19021
+ get_rewards_balance: {
19022
+ parameters: {
19023
+ query?: never;
19024
+ header?: never;
19025
+ path?: never;
19026
+ cookie?: never;
19027
+ };
19028
+ requestBody?: never;
19029
+ responses: {
19030
+ /** @description OK */
19031
+ 200: {
19032
+ headers: {
19033
+ [name: string]: unknown;
19034
+ };
19035
+ content: {
19036
+ "application/json": components["schemas"]["GetRewardsBalanceResponse"];
19037
+ };
19038
+ };
19039
+ /** @description Authentication required */
19040
+ 401: {
19041
+ headers: {
19042
+ [name: string]: unknown;
19043
+ };
19044
+ content?: never;
19045
+ };
19046
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
19047
+ 429: {
19048
+ headers: {
19049
+ [name: string]: unknown;
19050
+ };
19051
+ content?: never;
19052
+ };
19053
+ /** @description Internal server error */
19054
+ 500: {
19055
+ headers: {
19056
+ [name: string]: unknown;
19057
+ };
19058
+ content?: never;
19059
+ };
19060
+ };
19061
+ };
19062
+ transfer_rewards: {
19063
+ parameters: {
19064
+ query?: never;
19065
+ header?: never;
19066
+ path?: never;
19067
+ cookie?: never;
19068
+ };
19069
+ requestBody: {
19070
+ content: {
19071
+ "application/json": components["schemas"]["TransferRewardsRequest"];
19072
+ };
19073
+ };
19074
+ responses: {
19075
+ /** @description OK */
19076
+ 200: {
19077
+ headers: {
19078
+ [name: string]: unknown;
19079
+ };
19080
+ content: {
19081
+ "application/json": components["schemas"]["TransferRewardsResponse"];
19082
+ };
19083
+ };
19084
+ /** @description Invalid token or amount */
19085
+ 400: {
19086
+ headers: {
19087
+ [name: string]: unknown;
19088
+ };
19089
+ content?: never;
19090
+ };
19091
+ /** @description Authentication required */
19092
+ 401: {
19093
+ headers: {
19094
+ [name: string]: unknown;
19095
+ };
19096
+ content?: never;
19097
+ };
19098
+ /** @description Insufficient rewards balance */
19099
+ 409: {
19100
+ headers: {
19101
+ [name: string]: unknown;
19102
+ };
19103
+ content?: never;
19104
+ };
19105
+ /** @description Movement rate limit exceeded — withdrawals, collateral transfers and reward transfers share a per-user budget; retry after the interval in details.retryAfter */
19106
+ 429: {
19107
+ headers: {
19108
+ [name: string]: unknown;
19109
+ };
19110
+ content?: never;
19111
+ };
19112
+ /** @description Internal server error */
19113
+ 500: {
19114
+ headers: {
19115
+ [name: string]: unknown;
19116
+ };
19117
+ content?: never;
19118
+ };
19119
+ };
19120
+ };
18188
19121
  get_trade_by_id: {
18189
19122
  parameters: {
18190
19123
  query?: never;