@n1xyz/nord-ts 0.2.0 → 0.3.2

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.
@@ -273,6 +273,9 @@ export declare class NordUser {
273
273
  * @param accountId - Account executing the trigger
274
274
  * @returns Object containing the actionId of the submitted trigger
275
275
  * @throws {NordError} If the operation fails
276
+ *
277
+ * NOTE: You can upsert a trigger by providing the same trigger data
278
+ * with specifically identifiaction by (marketId, accountId,side,kind).
276
279
  */
277
280
  addTrigger({ marketId, side, kind, triggerPrice, limitPrice, accountId, }: Readonly<{
278
281
  marketId: number;
@@ -3868,10 +3868,6 @@ export declare enum Error {
3868
3868
  * @generated from enum value: KEY_ALREADY_REGISTERED = 15;
3869
3869
  */
3870
3870
  KEY_ALREADY_REGISTERED = 15,
3871
- /**
3872
- * @generated from enum value: EXPIRY_TIMESTAMP_IN_PAST = 16;
3873
- */
3874
- EXPIRY_TIMESTAMP_IN_PAST = 16,
3875
3871
  /**
3876
3872
  * @generated from enum value: UPDATE_TIMESTAMP_IN_PAST = 17;
3877
3873
  */
@@ -4147,12 +4143,17 @@ export declare enum Error {
4147
4143
  TRIGGER_NOT_FOUND = 170,
4148
4144
  /**
4149
4145
  * 10110_000
4146
+ * Prefix which says that timestamp used as part of action is is not allowed
4150
4147
  *
4151
4148
  * @generated from enum value: TIMESTAMP = 176;
4152
4149
  */
4153
4150
  TIMESTAMP = 176,
4154
4151
  /**
4155
4152
  * 10110_001
4153
+ * Used to ensure that client is in sync with engine timestamp,
4154
+ * to avoid replay attacks. Please update you client time periodically.
4155
+ * See `Config::ACTION_TIMESTAMP_STALE_THRESHOLD` for range allowed to be out
4156
+ * of timestamp value.
4156
4157
  *
4157
4158
  * @generated from enum value: TIMESTAMP_OUT_OF_THRESHOLD = 177;
4158
4159
  */
@@ -4161,6 +4162,12 @@ export declare enum Error {
4161
4162
  * @generated from enum value: TIMESTAMP_STALE = 178;
4162
4163
  */
4163
4164
  TIMESTAMP_STALE = 178,
4165
+ /**
4166
+ * Expiry of entity with lifetime must be in future, specifically session.
4167
+ *
4168
+ * @generated from enum value: EXPIRY_TIMESTAMP_IN_PAST = 16;
4169
+ */
4170
+ EXPIRY_TIMESTAMP_IN_PAST = 16,
4164
4171
  /**
4165
4172
  * 10111_000
4166
4173
  * BANKRUPTCY = 184;
@@ -4416,7 +4423,7 @@ export declare enum Error {
4416
4423
  *
4417
4424
  * @generated from enum nord.Error
4418
4425
  */
4419
- export type ErrorJson = "DUPLICATE" | "DECODE_FAILURE" | "INVALID_SIGNATURE" | "MARKET_NOT_FOUND" | "TOKEN_NOT_FOUND" | "USER_NOT_FOUND" | "SESSION_NOT_FOUND" | "ORDER_NOT_FOUND" | "ORDER_SIZE_ZERO" | "ARITHMETIC" | "ARITHMETIC_OVERFLOW" | "ARITHMETIC_UNDERFLOW" | "ARITHMETIC_DIVISION_BY_ZERO" | "KEY_ALREADY_REGISTERED" | "EXPIRY_TIMESTAMP_IN_PAST" | "UPDATE_TIMESTAMP_IN_PAST" | "TOO_MANY_OPEN_ORDERS" | "WITHDRAW_AMOUNT_TOO_SMALL" | "INVALID_ORDER_OWNER" | "DECODE_FAILURE_LENGTH_PREFIX" | "DECODE_FAILURE_RAW" | "DECODE_FAILURE_DOMAIN" | "UPDATE_PUBLISH_TIME_IN_PAST" | "PYTH_FEED_NOT_ADDED" | "PYTH_FEED_MISSING" | "PYTH_FEED_ALREADY_ADDED" | "PYTH_GUARDIAN_SET_UNINITIALIZED" | "PYTH_GUARDIAN_SET_INVALID" | "PYTH_FEED_DECIMALS_OUT_OF_RANGE" | "PYTH_FEED_PRICE_OUT_OF_RANGE" | "PYTH_FEED_VARIANCE_OUT_OF_RANGE" | "PYTH_GUARDIAN_SET_AND_PYTH_SIGNATURE_DO_NOT_MATCH" | "INVALID_TOKEN_PARAMETERS" | "INDEX_PRICE_OUT_OF_RANGE" | "INDEX_DECIMALS_OUT_OF_RANGE" | "INVALID_STATE_VERSION" | "TIER_FEE_OUT_OF_RANGE" | "TIER_ID_OUT_OF_RANGE" | "INVALID_MARGINS" | "MARKET_DECIMALS_EXCEED_LIMITS" | "TOO_MANY_TOKENS" | "FUNDING_OVERFLOW" | "CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED" | "UNEXPECTED_TOKEN_ID" | "TOKEN_NOT_READY" | "TOKEN_ALREADY_REGISTERED" | "IMMEDIATE_ORDER_GOT_NO_FILLS" | "FAILED_TO_FILL_LIMIT" | "POST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS" | "INVALID" | "MAINTENANCE" | "MINIMUM_SIZE_DECIMALS" | "PARAMETERS_WILL_CREATE_NON_OPERATIONAL_MARKET" | "ONLY_IMMEDIATE_ORDERS_ALLOWED" | "TOO_MANY_USER_ACCOUNTS" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_INVALID_OWNER" | "DUST_ACCOUNT" | "BALANCE" | "BALANCE_DEPOSIT_OVERFLOW" | "BALANCE_CHANGE_OVERFLOW" | "BALANCE_CHANGE_LIMIT_EXCEEDED" | "BALANCE_INSUFFICIENT" | "UNAUTHENTICATED_L1_ACTION" | "ENCODED_ACTION_TOO_LARGE" | "TRIGGER" | "TRIGGER_INVALID_PRICE" | "TRIGGER_NOT_FOUND" | "TIMESTAMP" | "TIMESTAMP_OUT_OF_THRESHOLD" | "TIMESTAMP_STALE" | "BANKRUPTCY_INSUFFICIENT_COVERAGE" | "BANKRUPTCY_NOT_FOUND" | "BANKRUPTCY_NOT_ALLOWED" | "MARKET_NOT_READY" | "MARKET_FROZEN" | "MARKET_EMPTY" | "POSITION" | "POSITION_NOT_FOUND" | "POSITION_STATE_ORDER" | "POSITION_STATE_ORDER_PRICE" | "POSITION_STATE_ORDER_SIZE" | "POSITION_STATE_ORDER_SIDE" | "POSITION_SIZE_LIMIT" | "POSITION_STATE_PERP" | "POSITION_STATE_ORDER_DELEGATION" | "PRICE" | "SIGNATURE_VERIFICATION" | "SIGNATURE_VERIFICATION_MALFORMED_PUBLIC_KEY" | "SIGNATURE_VERIFICATION_INVALID_LENGTH" | "RISK" | "RISK_DELEGATION_MF_TO_BE_LESS_THAN_OR_EQUAL_MMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_IMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_TRADE_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_UNHEALTHY_MF_AND_PON_AFTER_BETTER_OF_BEFORE" | "ORDER_EXECUTION" | "ORDER_EXECUTION_EMPTY" | "ORDER_EXECUTION_FILL_OR_KILL" | "ORDER_EXECUTION_MISSING_LIMITS" | "ORDER_EXECUTION_MISSING_PRICE" | "ORDER_EXECUTION_SIZE_LIMIT" | "ORDER_EXECUTION_LIMIT_PRICE" | "ORDER_REDUCE_IS_POST_ONLY" | "ORDER_EXECUTION_SELL_PRICE" | "ORDER_SIZE_EXCEEDS_POSITION_SIZE" | "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES" | "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES" | "ACTION_POSITION_SHOULD_BE_COVERED" | "ACTION_INVALID_NONCE" | "ACTION_PROPOSED_PRICE_MUST_BE_HIGHER" | "ADMIN_ROLE_INSUFFICIENT" | "ADMIN_NOT_FOUND" | "UNIQUE_SUPER_ADMIN_CANNOT_BE_REMOVED" | "SUPER_ADMIN_ALREADY_EXISTS" | "NOT_IMPLEMENTED" | "Dropped";
4426
+ export type ErrorJson = "DUPLICATE" | "DECODE_FAILURE" | "INVALID_SIGNATURE" | "MARKET_NOT_FOUND" | "TOKEN_NOT_FOUND" | "USER_NOT_FOUND" | "SESSION_NOT_FOUND" | "ORDER_NOT_FOUND" | "ORDER_SIZE_ZERO" | "ARITHMETIC" | "ARITHMETIC_OVERFLOW" | "ARITHMETIC_UNDERFLOW" | "ARITHMETIC_DIVISION_BY_ZERO" | "KEY_ALREADY_REGISTERED" | "UPDATE_TIMESTAMP_IN_PAST" | "TOO_MANY_OPEN_ORDERS" | "WITHDRAW_AMOUNT_TOO_SMALL" | "INVALID_ORDER_OWNER" | "DECODE_FAILURE_LENGTH_PREFIX" | "DECODE_FAILURE_RAW" | "DECODE_FAILURE_DOMAIN" | "UPDATE_PUBLISH_TIME_IN_PAST" | "PYTH_FEED_NOT_ADDED" | "PYTH_FEED_MISSING" | "PYTH_FEED_ALREADY_ADDED" | "PYTH_GUARDIAN_SET_UNINITIALIZED" | "PYTH_GUARDIAN_SET_INVALID" | "PYTH_FEED_DECIMALS_OUT_OF_RANGE" | "PYTH_FEED_PRICE_OUT_OF_RANGE" | "PYTH_FEED_VARIANCE_OUT_OF_RANGE" | "PYTH_GUARDIAN_SET_AND_PYTH_SIGNATURE_DO_NOT_MATCH" | "INVALID_TOKEN_PARAMETERS" | "INDEX_PRICE_OUT_OF_RANGE" | "INDEX_DECIMALS_OUT_OF_RANGE" | "INVALID_STATE_VERSION" | "TIER_FEE_OUT_OF_RANGE" | "TIER_ID_OUT_OF_RANGE" | "INVALID_MARGINS" | "MARKET_DECIMALS_EXCEED_LIMITS" | "TOO_MANY_TOKENS" | "FUNDING_OVERFLOW" | "CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED" | "UNEXPECTED_TOKEN_ID" | "TOKEN_NOT_READY" | "TOKEN_ALREADY_REGISTERED" | "IMMEDIATE_ORDER_GOT_NO_FILLS" | "FAILED_TO_FILL_LIMIT" | "POST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS" | "INVALID" | "MAINTENANCE" | "MINIMUM_SIZE_DECIMALS" | "PARAMETERS_WILL_CREATE_NON_OPERATIONAL_MARKET" | "ONLY_IMMEDIATE_ORDERS_ALLOWED" | "TOO_MANY_USER_ACCOUNTS" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_INVALID_OWNER" | "DUST_ACCOUNT" | "BALANCE" | "BALANCE_DEPOSIT_OVERFLOW" | "BALANCE_CHANGE_OVERFLOW" | "BALANCE_CHANGE_LIMIT_EXCEEDED" | "BALANCE_INSUFFICIENT" | "UNAUTHENTICATED_L1_ACTION" | "ENCODED_ACTION_TOO_LARGE" | "TRIGGER" | "TRIGGER_INVALID_PRICE" | "TRIGGER_NOT_FOUND" | "TIMESTAMP" | "TIMESTAMP_OUT_OF_THRESHOLD" | "TIMESTAMP_STALE" | "EXPIRY_TIMESTAMP_IN_PAST" | "BANKRUPTCY_INSUFFICIENT_COVERAGE" | "BANKRUPTCY_NOT_FOUND" | "BANKRUPTCY_NOT_ALLOWED" | "MARKET_NOT_READY" | "MARKET_FROZEN" | "MARKET_EMPTY" | "POSITION" | "POSITION_NOT_FOUND" | "POSITION_STATE_ORDER" | "POSITION_STATE_ORDER_PRICE" | "POSITION_STATE_ORDER_SIZE" | "POSITION_STATE_ORDER_SIDE" | "POSITION_SIZE_LIMIT" | "POSITION_STATE_PERP" | "POSITION_STATE_ORDER_DELEGATION" | "PRICE" | "SIGNATURE_VERIFICATION" | "SIGNATURE_VERIFICATION_MALFORMED_PUBLIC_KEY" | "SIGNATURE_VERIFICATION_INVALID_LENGTH" | "RISK" | "RISK_DELEGATION_MF_TO_BE_LESS_THAN_OR_EQUAL_MMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_IMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_TRADE_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_UNHEALTHY_MF_AND_PON_AFTER_BETTER_OF_BEFORE" | "ORDER_EXECUTION" | "ORDER_EXECUTION_EMPTY" | "ORDER_EXECUTION_FILL_OR_KILL" | "ORDER_EXECUTION_MISSING_LIMITS" | "ORDER_EXECUTION_MISSING_PRICE" | "ORDER_EXECUTION_SIZE_LIMIT" | "ORDER_EXECUTION_LIMIT_PRICE" | "ORDER_REDUCE_IS_POST_ONLY" | "ORDER_EXECUTION_SELL_PRICE" | "ORDER_SIZE_EXCEEDS_POSITION_SIZE" | "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES" | "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES" | "ACTION_POSITION_SHOULD_BE_COVERED" | "ACTION_INVALID_NONCE" | "ACTION_PROPOSED_PRICE_MUST_BE_HIGHER" | "ADMIN_ROLE_INSUFFICIENT" | "ADMIN_NOT_FOUND" | "UNIQUE_SUPER_ADMIN_CANNOT_BE_REMOVED" | "SUPER_ADMIN_ALREADY_EXISTS" | "NOT_IMPLEMENTED" | "Dropped";
4420
4427
  /**
4421
4428
  * Describes the enum nord.Error.
4422
4429
  */
@@ -707,7 +707,7 @@ export interface paths {
707
707
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
708
708
  until?: string;
709
709
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
710
- startInclusive?: number | null;
710
+ startInclusive?: string | null;
711
711
  /** @description Query returns up to 50 trades in one go. */
712
712
  pageSize?: number | null;
713
713
  };
@@ -725,7 +725,7 @@ export interface paths {
725
725
  [name: string]: unknown;
726
726
  };
727
727
  content: {
728
- "application/json": components["schemas"]["PageResult_for_uint64_and_AccountPnlInfo"];
728
+ "application/json": components["schemas"]["PageResult_for_String_and_AccountPnlInfo"];
729
729
  };
730
730
  };
731
731
  };
@@ -738,13 +738,18 @@ export interface paths {
738
738
  patch?: never;
739
739
  trace?: never;
740
740
  };
741
- "/account/{account_id}/pnl/history/PT1H": {
741
+ "/account/{account_id}/pnl/funding/history/PT1H": {
742
742
  parameters: {
743
743
  query?: never;
744
744
  header?: never;
745
745
  path?: never;
746
746
  cookie?: never;
747
747
  };
748
+ /** @description 11:00 - funding rate captured 11:30 - position 10 funding 0.01 12:00 - capture 12:20 - position zeroed
749
+ *
750
+ * will return - used payed funding for 11:00-12.00, using last position before 12:00 capture using funding index formed at 11:30 and market funding index formed at 12:00 - 12:00 - 13:00 PnL will not be returned at all.
751
+ *
752
+ * For exact applied PnL use more per trade PnL. */
748
753
  get: {
749
754
  parameters: {
750
755
  query?: never;
@@ -790,7 +795,7 @@ export interface paths {
790
795
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
791
796
  until?: string;
792
797
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
793
- startInclusive?: number | null;
798
+ startInclusive?: string | null;
794
799
  /** @description Query returns up to 50 trades in one go. */
795
800
  pageSize?: number | null;
796
801
  };
@@ -807,7 +812,7 @@ export interface paths {
807
812
  [name: string]: unknown;
808
813
  };
809
814
  content: {
810
- "application/json": components["schemas"]["PageResult_for_uint64_and_Trigger"];
815
+ "application/json": components["schemas"]["PageResult_for_String_and_Trigger"];
811
816
  };
812
817
  };
813
818
  };
@@ -843,7 +848,80 @@ export interface paths {
843
848
  [name: string]: unknown;
844
849
  };
845
850
  content: {
846
- "application/json": components["schemas"]["AccountTriggerInfo"][] | null;
851
+ "application/json": components["schemas"]["TriggerInfo"][] | null;
852
+ };
853
+ };
854
+ };
855
+ };
856
+ put?: never;
857
+ post?: never;
858
+ delete?: never;
859
+ options?: never;
860
+ head?: never;
861
+ patch?: never;
862
+ trace?: never;
863
+ };
864
+ "/triggers/active": {
865
+ parameters: {
866
+ query?: never;
867
+ header?: never;
868
+ path?: never;
869
+ cookie?: never;
870
+ };
871
+ get: {
872
+ parameters: {
873
+ query?: {
874
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
875
+ startInclusive?: string | null;
876
+ /** @description Query returns up to 50 trades in one go. */
877
+ pageSize?: number | null;
878
+ };
879
+ header?: never;
880
+ path?: never;
881
+ cookie?: never;
882
+ };
883
+ requestBody?: never;
884
+ responses: {
885
+ 200: {
886
+ headers: {
887
+ [name: string]: unknown;
888
+ };
889
+ content: {
890
+ "application/json": components["schemas"]["PageResult_for_String_and_TriggerInfo"];
891
+ };
892
+ };
893
+ };
894
+ };
895
+ put?: never;
896
+ post?: never;
897
+ delete?: never;
898
+ options?: never;
899
+ head?: never;
900
+ patch?: never;
901
+ trace?: never;
902
+ };
903
+ "/accounts/count": {
904
+ parameters: {
905
+ query?: never;
906
+ header?: never;
907
+ path?: never;
908
+ cookie?: never;
909
+ };
910
+ get: {
911
+ parameters: {
912
+ query?: never;
913
+ header?: never;
914
+ path?: never;
915
+ cookie?: never;
916
+ };
917
+ requestBody?: never;
918
+ responses: {
919
+ 200: {
920
+ headers: {
921
+ [name: string]: unknown;
922
+ };
923
+ content: {
924
+ "application/json": number;
847
925
  };
848
926
  };
849
927
  };
@@ -1147,6 +1225,40 @@ export interface paths {
1147
1225
  patch?: never;
1148
1226
  trace?: never;
1149
1227
  };
1228
+ "/state/info/hist": {
1229
+ parameters: {
1230
+ query?: never;
1231
+ header?: never;
1232
+ path?: never;
1233
+ cookie?: never;
1234
+ };
1235
+ get: {
1236
+ parameters: {
1237
+ query?: never;
1238
+ header?: never;
1239
+ path?: never;
1240
+ cookie?: never;
1241
+ };
1242
+ requestBody?: never;
1243
+ responses: {
1244
+ 200: {
1245
+ headers: {
1246
+ [name: string]: unknown;
1247
+ };
1248
+ content: {
1249
+ "application/json": components["schemas"]["StateHistInfo"];
1250
+ };
1251
+ };
1252
+ };
1253
+ };
1254
+ put?: never;
1255
+ post?: never;
1256
+ delete?: never;
1257
+ options?: never;
1258
+ head?: never;
1259
+ patch?: never;
1260
+ trace?: never;
1261
+ };
1150
1262
  "/fee/brackets/info": {
1151
1263
  parameters: {
1152
1264
  query?: never;
@@ -1420,7 +1532,7 @@ export interface paths {
1420
1532
  /** @description end with this timestamp (RFC3339); defaults to current date-time */
1421
1533
  until?: string;
1422
1534
  /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
1423
- startInclusive?: number | null;
1535
+ startInclusive?: string | null;
1424
1536
  /** @description Query returns up to 50 trades in one go. */
1425
1537
  pageSize?: number | null;
1426
1538
  };
@@ -1438,7 +1550,7 @@ export interface paths {
1438
1550
  [name: string]: unknown;
1439
1551
  };
1440
1552
  content: {
1441
- "application/json": components["schemas"]["PageResult_for_uint64_and_Withdrawal"];
1553
+ "application/json": components["schemas"]["PageResult_for_String_and_Withdrawal"];
1442
1554
  };
1443
1555
  };
1444
1556
  404: {
@@ -1495,6 +1607,43 @@ export interface paths {
1495
1607
  patch?: never;
1496
1608
  trace?: never;
1497
1609
  };
1610
+ "/market/{market_id}/history/PT1H": {
1611
+ parameters: {
1612
+ query?: never;
1613
+ header?: never;
1614
+ path?: never;
1615
+ cookie?: never;
1616
+ };
1617
+ /** @description Gets market updates history for some period of time. Default is hourly for last 24 hours */
1618
+ get: {
1619
+ parameters: {
1620
+ query?: never;
1621
+ header?: never;
1622
+ path: {
1623
+ market_id: number;
1624
+ };
1625
+ cookie?: never;
1626
+ };
1627
+ requestBody?: never;
1628
+ responses: {
1629
+ 200: {
1630
+ headers: {
1631
+ [name: string]: unknown;
1632
+ };
1633
+ content: {
1634
+ "application/json": components["schemas"]["PageResult_for_String_and_MarketHistoryInfo"];
1635
+ };
1636
+ };
1637
+ };
1638
+ };
1639
+ put?: never;
1640
+ post?: never;
1641
+ delete?: never;
1642
+ options?: never;
1643
+ head?: never;
1644
+ patch?: never;
1645
+ trace?: never;
1646
+ };
1498
1647
  }
1499
1648
  export type webhooks = Record<string, never>;
1500
1649
  export interface components {
@@ -2464,7 +2613,9 @@ export interface components {
2464
2613
  indexPriceConf: number;
2465
2614
  frozen?: boolean;
2466
2615
  /** Format: double */
2467
- volume24h: number;
2616
+ volumeBase24h: number;
2617
+ /** Format: double */
2618
+ volumeQuote24h: number;
2468
2619
  /** Format: double */
2469
2620
  high24h: number;
2470
2621
  /** Format: double */
@@ -2545,8 +2696,7 @@ export interface components {
2545
2696
  placedSize: number;
2546
2697
  /** Format: double */
2547
2698
  filledSize?: number | null;
2548
- /** Format: uint64 */
2549
- updateActionId: number;
2699
+ updateActionId: string;
2550
2700
  isReduceOnly: boolean;
2551
2701
  fillMode: components["schemas"]["FillMode"];
2552
2702
  /** Format: double */
@@ -2681,11 +2831,8 @@ export interface components {
2681
2831
  * @default null
2682
2832
  */
2683
2833
  until: string;
2684
- /**
2685
- * Format: uint64
2686
- * @description fetch results starting with this page; query starts with first entry if page isn't specified
2687
- */
2688
- startInclusive?: number | null;
2834
+ /** @description fetch results starting with this page; query starts with first entry if page isn't specified */
2835
+ startInclusive?: string | null;
2689
2836
  /**
2690
2837
  * Format: uint8
2691
2838
  * @description Query returns up to 50 trades in one go.
@@ -2693,19 +2840,15 @@ export interface components {
2693
2840
  */
2694
2841
  pageSize: number | null;
2695
2842
  };
2696
- PageResult_for_uint64_and_AccountPnlInfo: {
2843
+ PageResult_for_String_and_AccountPnlInfo: {
2697
2844
  /** @description Set of items for requested by query. */
2698
2845
  items: components["schemas"]["AccountPnlInfo"][];
2699
- /**
2700
- * Format: uint64
2701
- * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
2702
- */
2703
- nextStartInclusive?: number | null;
2846
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2847
+ nextStartInclusive?: string | null;
2704
2848
  };
2705
2849
  AccountPnlInfo: {
2706
2850
  time: string;
2707
- /** Format: uint64 */
2708
- actionId: number;
2851
+ actionId: string;
2709
2852
  /** Format: uint32 */
2710
2853
  accountId: number;
2711
2854
  /** Format: double */
@@ -2721,13 +2864,6 @@ export interface components {
2721
2864
  AccountPnlHistInfo: {
2722
2865
  /** @description Same time when funding is applied */
2723
2866
  time: string;
2724
- /** Format: double */
2725
- fundingPnl: number;
2726
- /**
2727
- * Format: double
2728
- * @description in USDC, PnL from position price and price and trade price difference
2729
- */
2730
- tradedPnl: number;
2731
2867
  /**
2732
2868
  * Format: double
2733
2869
  * @description Funding rate used to calculate this funding payment
@@ -2737,11 +2873,19 @@ export interface components {
2737
2873
  * Format: double
2738
2874
  * @description Size used to calculated funding payment
2739
2875
  */
2740
- fundingSize: number;
2876
+ fundingSize?: number | null;
2741
2877
  /** @description Side on time of funding application. */
2742
2878
  side?: components["schemas"]["Side"] | null;
2743
- /** Format: double */
2744
- positionSizeTraded: number;
2879
+ /**
2880
+ * Format: double
2881
+ * @description Result of `user_funding_index - market_Funding_index`.
2882
+ */
2883
+ fundingIndexChange?: number | null;
2884
+ /**
2885
+ * Format: double
2886
+ * @description Funding pnl for this funding period, i.e. funding_size * funding_index_change. Negate for the funding paid by the account for this period.
2887
+ */
2888
+ fundingPnl: number;
2745
2889
  market: components["schemas"]["MarketIdInfo"];
2746
2890
  };
2747
2891
  MarketIdInfo: {
@@ -2749,14 +2893,11 @@ export interface components {
2749
2893
  market_id: number;
2750
2894
  market_symbol: string;
2751
2895
  };
2752
- PageResult_for_uint64_and_Trigger: {
2896
+ PageResult_for_String_and_Trigger: {
2753
2897
  /** @description Set of items for requested by query. */
2754
2898
  items: components["schemas"]["Trigger"][];
2755
- /**
2756
- * Format: uint64
2757
- * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
2758
- */
2759
- nextStartInclusive?: number | null;
2899
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2900
+ nextStartInclusive?: string | null;
2760
2901
  };
2761
2902
  Trigger: {
2762
2903
  /** Format: uint32 */
@@ -2768,10 +2909,8 @@ export interface components {
2768
2909
  side: components["schemas"]["Side"];
2769
2910
  kind: components["schemas"]["TriggerKind"];
2770
2911
  status: components["schemas"]["TriggerStatus"];
2771
- /** Format: uint64 */
2772
- createdAtActionId: number;
2773
- /** Format: uint64 */
2774
- finalizedAtActionId?: number | null;
2912
+ createdAtActionId: string;
2913
+ finalizedAtActionId?: string | null;
2775
2914
  createdAt: string;
2776
2915
  finalizedAt: string;
2777
2916
  };
@@ -2784,22 +2923,26 @@ export interface components {
2784
2923
  TriggerKind: "stopLoss" | "takeProfit";
2785
2924
  /** @enum {string} */
2786
2925
  TriggerStatus: "Active" | "Success" | "Removed" | "Canceled";
2787
- /** @description Trigger into per account. */
2788
- AccountTriggerInfo: {
2926
+ TriggerInfo: {
2927
+ /** Format: uint32 */
2928
+ accountId: number;
2789
2929
  /** Format: uint32 */
2790
2930
  marketId: number;
2791
- key: components["schemas"]["TriggerKey"];
2792
- triggerPrices: components["schemas"]["TriggerPrice"];
2793
- /** Format: uint64 */
2794
- actionId: number;
2795
- };
2796
- TriggerKey: {
2931
+ /** Format: int64 */
2932
+ triggerPrice: number;
2933
+ /** Format: int64 */
2934
+ limitPrice?: number | null;
2797
2935
  side: components["schemas"]["Side"];
2798
2936
  kind: components["schemas"]["TriggerKind"];
2937
+ /** @description created_at_action_id */
2938
+ actionId: string;
2939
+ createdAt: string;
2799
2940
  };
2800
- TriggerPrice: {
2801
- trigger: components["schemas"]["PositivePriceMantissa"];
2802
- settlement?: components["schemas"]["PositivePriceMantissa"] | null;
2941
+ PageResult_for_String_and_TriggerInfo: {
2942
+ /** @description Set of items for requested by query. */
2943
+ items: components["schemas"]["TriggerInfo"][];
2944
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
2945
+ nextStartInclusive?: string | null;
2803
2946
  };
2804
2947
  OrderNotFound: null;
2805
2948
  PageResult_for_String_and_Trade: {
@@ -2862,13 +3005,17 @@ export interface components {
2862
3005
  */
2863
3006
  pageSize: number | null;
2864
3007
  };
2865
- DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["Op_for_uint64"] | components["schemas"]["Op_for_uint64"] | null;
3008
+ DownloadFilter: components["schemas"]["Op_for_DataDateTime"] | components["schemas"]["Op_for_String"] | components["schemas"]["Op_for_uint64"] | null;
2866
3009
  /** @description Parses tag (anycase), and value in round braces using `from_str`. */
2867
3010
  Op_for_DataDateTime: {
2868
3011
  le: components["schemas"]["DataDateTime"];
2869
3012
  };
2870
3013
  DataDateTime: string;
2871
3014
  /** @description Parses tag (anycase), and value in round braces using `from_str`. */
3015
+ Op_for_String: {
3016
+ le: string;
3017
+ };
3018
+ /** @description Parses tag (anycase), and value in round braces using `from_str`. */
2872
3019
  Op_for_uint64: {
2873
3020
  /** Format: uint64 */
2874
3021
  le: number;
@@ -2900,6 +3047,12 @@ export interface components {
2900
3047
  timestamp: number;
2901
3048
  paused: boolean;
2902
3049
  };
3050
+ StateHistInfo: {
3051
+ versions: [
3052
+ number,
3053
+ components["schemas"]["ExecutableVersion"]
3054
+ ][];
3055
+ };
2903
3056
  /** Format: uint32 */
2904
3057
  FeeTierId: number;
2905
3058
  FeeTierConfig: {
@@ -2959,7 +3112,9 @@ export interface components {
2959
3112
  /** Format: uint32 */
2960
3113
  marketId: number;
2961
3114
  /** Format: double */
2962
- volume: number;
3115
+ volumeBase: number;
3116
+ /** Format: double */
3117
+ volumeQuote: number;
2963
3118
  };
2964
3119
  GetPrevMarketPriceQuery: {
2965
3120
  atOrBefore: string;
@@ -2970,19 +3125,15 @@ export interface components {
2970
3125
  /** Format: double */
2971
3126
  price?: number | null;
2972
3127
  };
2973
- PageResult_for_uint64_and_Withdrawal: {
3128
+ PageResult_for_String_and_Withdrawal: {
2974
3129
  /** @description Set of items for requested by query. */
2975
3130
  items: components["schemas"]["Withdrawal"][];
2976
- /**
2977
- * Format: uint64
2978
- * @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined.
2979
- */
2980
- nextStartInclusive?: number | null;
3131
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
3132
+ nextStartInclusive?: string | null;
2981
3133
  };
2982
3134
  Withdrawal: {
2983
3135
  time: string;
2984
- /** Format: uint64 */
2985
- actionId: number;
3136
+ actionId: string;
2986
3137
  /** Format: uint32 */
2987
3138
  accountId: number;
2988
3139
  /** Format: uint32 */
@@ -3158,6 +3309,26 @@ export interface components {
3158
3309
  };
3159
3310
  /** @description Empty object, to make quotes item conform to API error spec */
3160
3311
  TvQuotesErrorValues: Record<string, never>;
3312
+ PageResult_for_String_and_MarketHistoryInfo: {
3313
+ /** @description Set of items for requested by query. */
3314
+ items: components["schemas"]["MarketHistoryInfo"][];
3315
+ /** @description If request contains more data, this is the id is set with which next request should be performed to get next page. If no more data, then it is undefined. */
3316
+ nextStartInclusive?: string | null;
3317
+ };
3318
+ MarketHistoryInfo: {
3319
+ /** Format: uint32 */
3320
+ marketId: number;
3321
+ time: string;
3322
+ actionId: string;
3323
+ fundingIndex: components["schemas"]["FundingIndexMantissa"];
3324
+ /** Format: double */
3325
+ fundingRate: number;
3326
+ };
3327
+ /**
3328
+ * Format: int128
3329
+ * @description Consist of some sum of `SignedBasisPoints` weighted by `PriceMantissa`(with market decimals). Funding rate jitters around 0, so really hard to get big numbers. Is `basic points numerator * market price mantissa` unit.
3330
+ */
3331
+ FundingIndexMantissa: number;
3161
3332
  };
3162
3333
  responses: never;
3163
3334
  parameters: never;