zklighter-perps 1.0.187 → 1.0.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json CHANGED
@@ -462,7 +462,7 @@
462
462
  "200": {
463
463
  "description": "A successful response.",
464
464
  "schema": {
465
- "$ref": "#/definitions/AirdropPercentages"
465
+ "$ref": "#/definitions/AirdropAllocations"
466
466
  }
467
467
  },
468
468
  "400": {
@@ -499,7 +499,7 @@
499
499
  "consumes": [
500
500
  "multipart/form-data"
501
501
  ],
502
- "description": "Get airdrop percentages"
502
+ "description": "Get airdrop allocation"
503
503
  }
504
504
  },
505
505
  "/api/v1/airdrop/create": {
@@ -533,7 +533,7 @@
533
533
  "in": "body",
534
534
  "required": true,
535
535
  "schema": {
536
- "$ref": "#/definitions/ReqCreateAirdropPercentages"
536
+ "$ref": "#/definitions/ReqCreateAirdropAllocations"
537
537
  }
538
538
  }
539
539
  ],
@@ -543,7 +543,7 @@
543
543
  "consumes": [
544
544
  "multipart/form-data"
545
545
  ],
546
- "description": "Create airdrop percentages"
546
+ "description": "Create airdrop allocation"
547
547
  }
548
548
  },
549
549
  "/api/v1/announcement": {
@@ -867,6 +867,92 @@
867
867
  "description": "Get if next bridge is fast"
868
868
  }
869
869
  },
870
+ "/api/v1/candles": {
871
+ "get": {
872
+ "summary": "candles",
873
+ "operationId": "candles",
874
+ "responses": {
875
+ "200": {
876
+ "description": "A successful response.",
877
+ "schema": {
878
+ "$ref": "#/definitions/Candles"
879
+ }
880
+ },
881
+ "400": {
882
+ "description": "Bad request",
883
+ "schema": {
884
+ "$ref": "#/definitions/ResultCode"
885
+ }
886
+ }
887
+ },
888
+ "parameters": [
889
+ {
890
+ "name": "market_id",
891
+ "in": "query",
892
+ "required": true,
893
+ "type": "integer",
894
+ "format": "int16"
895
+ },
896
+ {
897
+ "name": "resolution",
898
+ "in": "query",
899
+ "required": true,
900
+ "type": "string",
901
+ "enum": [
902
+ "1m",
903
+ "5m",
904
+ "15m",
905
+ "30m",
906
+ "1h",
907
+ "4h",
908
+ "12h",
909
+ "1d",
910
+ "1w"
911
+ ]
912
+ },
913
+ {
914
+ "name": "start_timestamp",
915
+ "in": "query",
916
+ "required": true,
917
+ "type": "integer",
918
+ "format": "int64",
919
+ "minimum": 0,
920
+ "maximum": 5000000000000
921
+ },
922
+ {
923
+ "name": "end_timestamp",
924
+ "in": "query",
925
+ "required": true,
926
+ "type": "integer",
927
+ "format": "int64",
928
+ "minimum": 0,
929
+ "maximum": 5000000000000
930
+ },
931
+ {
932
+ "name": "count_back",
933
+ "in": "query",
934
+ "required": true,
935
+ "type": "integer",
936
+ "format": "int64"
937
+ },
938
+ {
939
+ "name": "set_timestamp_to_end",
940
+ "in": "query",
941
+ "required": false,
942
+ "type": "boolean",
943
+ "format": "boolean",
944
+ "default": "false"
945
+ }
946
+ ],
947
+ "tags": [
948
+ "candlestick"
949
+ ],
950
+ "consumes": [
951
+ "multipart/form-data"
952
+ ],
953
+ "description": "Get candles (optimized with shortened fields and smaller response size)"
954
+ }
955
+ },
870
956
  "/api/v1/candlesticks": {
871
957
  "get": {
872
958
  "summary": "candlesticks",
@@ -3512,6 +3598,11 @@
3512
3598
  "collateral": {
3513
3599
  "type": "string",
3514
3600
  "example": "46342"
3601
+ },
3602
+ "transaction_time": {
3603
+ "type": "integer",
3604
+ "format": "int64",
3605
+ "example": "1257894000000000"
3515
3606
  }
3516
3607
  },
3517
3608
  "title": "Account",
@@ -3526,7 +3617,8 @@
3526
3617
  "pending_order_count",
3527
3618
  "available_balance",
3528
3619
  "status",
3529
- "collateral"
3620
+ "collateral",
3621
+ "transaction_time"
3530
3622
  ]
3531
3623
  },
3532
3624
  "AccountApiKeys": {
@@ -4025,39 +4117,39 @@
4025
4117
  "total_volume"
4026
4118
  ]
4027
4119
  },
4028
- "AirdropPercentageItem": {
4120
+ "AirdropAllocationItem": {
4029
4121
  "type": "object",
4030
4122
  "properties": {
4031
4123
  "l1_address": {
4032
4124
  "type": "string"
4033
4125
  },
4034
- "percentage": {
4126
+ "allocation": {
4035
4127
  "type": "string"
4036
4128
  }
4037
4129
  },
4038
- "title": "AirdropPercentageItem",
4130
+ "title": "AirdropAllocationItem",
4039
4131
  "required": [
4040
4132
  "l1_address",
4041
- "percentage"
4133
+ "allocation"
4042
4134
  ]
4043
4135
  },
4044
- "AirdropPercentages": {
4136
+ "AirdropAllocations": {
4045
4137
  "type": "object",
4046
4138
  "properties": {
4047
4139
  "l1_address": {
4048
4140
  "type": "string"
4049
4141
  },
4050
- "percentages": {
4142
+ "allocations": {
4051
4143
  "type": "array",
4052
4144
  "items": {
4053
- "$ref": "#/definitions/AirdropPercentageItem"
4145
+ "$ref": "#/definitions/AirdropAllocationItem"
4054
4146
  }
4055
4147
  }
4056
4148
  },
4057
- "title": "AirdropPercentages",
4149
+ "title": "AirdropAllocations",
4058
4150
  "required": [
4059
4151
  "l1_address",
4060
- "percentages"
4152
+ "allocations"
4061
4153
  ]
4062
4154
  },
4063
4155
  "Announcement": {
@@ -4130,6 +4222,11 @@
4130
4222
  },
4131
4223
  "public_key": {
4132
4224
  "type": "string"
4225
+ },
4226
+ "transaction_time": {
4227
+ "type": "integer",
4228
+ "format": "int64",
4229
+ "example": "1257894000000000"
4133
4230
  }
4134
4231
  },
4135
4232
  "title": "ApiKey",
@@ -4137,7 +4234,8 @@
4137
4234
  "account_index",
4138
4235
  "api_key_index",
4139
4236
  "nonce",
4140
- "public_key"
4237
+ "public_key",
4238
+ "transaction_time"
4141
4239
  ]
4142
4240
  },
4143
4241
  "ApiToken": {
@@ -4515,6 +4613,129 @@
4515
4613
  "networks"
4516
4614
  ]
4517
4615
  },
4616
+ "Candle": {
4617
+ "type": "object",
4618
+ "properties": {
4619
+ "t": {
4620
+ "type": "integer",
4621
+ "format": "int64",
4622
+ "example": "1640995200",
4623
+ "description": " timestamp"
4624
+ },
4625
+ "o": {
4626
+ "type": "number",
4627
+ "format": "double",
4628
+ "example": "3024.66",
4629
+ "description": " open"
4630
+ },
4631
+ "h": {
4632
+ "type": "number",
4633
+ "format": "double",
4634
+ "example": "3034.66",
4635
+ "description": " high"
4636
+ },
4637
+ "l": {
4638
+ "type": "number",
4639
+ "format": "double",
4640
+ "example": "3014.66",
4641
+ "description": " low"
4642
+ },
4643
+ "c": {
4644
+ "type": "number",
4645
+ "format": "double",
4646
+ "example": "3024.66",
4647
+ "description": " close"
4648
+ },
4649
+ "O": {
4650
+ "type": "number",
4651
+ "format": "double",
4652
+ "example": "3024.66",
4653
+ "description": " open_raw"
4654
+ },
4655
+ "H": {
4656
+ "type": "number",
4657
+ "format": "double",
4658
+ "example": "3034.66",
4659
+ "description": " high_raw"
4660
+ },
4661
+ "L": {
4662
+ "type": "number",
4663
+ "format": "double",
4664
+ "example": "3014.66",
4665
+ "description": " low_raw"
4666
+ },
4667
+ "C": {
4668
+ "type": "number",
4669
+ "format": "double",
4670
+ "example": "3024.66",
4671
+ "description": " close_raw"
4672
+ },
4673
+ "v": {
4674
+ "type": "number",
4675
+ "format": "double",
4676
+ "example": "235.25",
4677
+ "description": " volume0"
4678
+ },
4679
+ "V": {
4680
+ "type": "number",
4681
+ "format": "double",
4682
+ "example": "93566.25",
4683
+ "description": " volume1"
4684
+ },
4685
+ "i": {
4686
+ "type": "integer",
4687
+ "format": "int64",
4688
+ "example": "1",
4689
+ "description": " last_trade_id"
4690
+ }
4691
+ },
4692
+ "title": "Candle",
4693
+ "required": [
4694
+ "t",
4695
+ "o",
4696
+ "h",
4697
+ "l",
4698
+ "c",
4699
+ "O",
4700
+ "H",
4701
+ "L",
4702
+ "C",
4703
+ "v",
4704
+ "V",
4705
+ "i"
4706
+ ]
4707
+ },
4708
+ "Candles": {
4709
+ "type": "object",
4710
+ "properties": {
4711
+ "code": {
4712
+ "type": "integer",
4713
+ "format": "int32",
4714
+ "example": "200"
4715
+ },
4716
+ "message": {
4717
+ "type": "string"
4718
+ },
4719
+ "r": {
4720
+ "type": "string",
4721
+ "example": "15m",
4722
+ "description": " resolution"
4723
+ },
4724
+ "c": {
4725
+ "type": "array",
4726
+ "items": {
4727
+ "$ref": "#/definitions/Candle"
4728
+ },
4729
+ "description": " candles"
4730
+ }
4731
+ },
4732
+ "title": "Candles",
4733
+ "required": [
4734
+ "code",
4735
+ "r",
4736
+ "c"
4737
+ ]
4738
+ },
4518
4739
  "Candlestick": {
4519
4740
  "type": "object",
4520
4741
  "properties": {
@@ -4577,6 +4798,11 @@
4577
4798
  "type": "integer",
4578
4799
  "format": "int64",
4579
4800
  "example": "1"
4801
+ },
4802
+ "trade_count": {
4803
+ "type": "integer",
4804
+ "format": "int64",
4805
+ "example": "1503241"
4580
4806
  }
4581
4807
  },
4582
4808
  "title": "Candlestick",
@@ -4592,7 +4818,8 @@
4592
4818
  "close_raw",
4593
4819
  "volume0",
4594
4820
  "volume1",
4595
- "last_trade_id"
4821
+ "last_trade_id",
4822
+ "trade_count"
4596
4823
  ]
4597
4824
  },
4598
4825
  "Candlesticks": {
@@ -4926,6 +5153,11 @@
4926
5153
  "type": "string",
4927
5154
  "example": "46342"
4928
5155
  },
5156
+ "transaction_time": {
5157
+ "type": "integer",
5158
+ "format": "int64",
5159
+ "example": "1257894000000000"
5160
+ },
4929
5161
  "account_index": {
4930
5162
  "type": "integer",
4931
5163
  "format": "int64"
@@ -4988,6 +5220,7 @@
4988
5220
  "available_balance",
4989
5221
  "status",
4990
5222
  "collateral",
5223
+ "transaction_time",
4991
5224
  "account_index",
4992
5225
  "name",
4993
5226
  "description",
@@ -5205,6 +5438,11 @@
5205
5438
  "format": "uint8",
5206
5439
  "example": "0"
5207
5440
  },
5441
+ "transaction_time": {
5442
+ "type": "integer",
5443
+ "format": "int64",
5444
+ "example": "1257894000000000"
5445
+ },
5208
5446
  "committed_at": {
5209
5447
  "type": "integer",
5210
5448
  "format": "int64",
@@ -5235,6 +5473,7 @@
5235
5473
  "sequence_index",
5236
5474
  "parent_hash",
5237
5475
  "api_key_index",
5476
+ "transaction_time",
5238
5477
  "committed_at",
5239
5478
  "verified_at"
5240
5479
  ]
@@ -5789,6 +6028,10 @@
5789
6028
  },
5790
6029
  "maker_fee": {
5791
6030
  "type": "string"
6031
+ },
6032
+ "transaction_time": {
6033
+ "type": "integer",
6034
+ "format": "int64"
5792
6035
  }
5793
6036
  },
5794
6037
  "title": "LiqTrade",
@@ -5796,7 +6039,8 @@
5796
6039
  "price",
5797
6040
  "size",
5798
6041
  "taker_fee",
5799
- "maker_fee"
6042
+ "maker_fee",
6043
+ "transaction_time"
5800
6044
  ]
5801
6045
  },
5802
6046
  "Liquidation": {
@@ -6146,6 +6390,11 @@
6146
6390
  "type": "integer",
6147
6391
  "format": "int64",
6148
6392
  "example": "1640995200"
6393
+ },
6394
+ "transaction_time": {
6395
+ "type": "integer",
6396
+ "format": "int64",
6397
+ "example": "1257894000000000"
6149
6398
  }
6150
6399
  },
6151
6400
  "title": "Order",
@@ -6182,7 +6431,8 @@
6182
6431
  "block_height",
6183
6432
  "timestamp",
6184
6433
  "created_at",
6185
- "updated_at"
6434
+ "updated_at",
6435
+ "transaction_time"
6186
6436
  ]
6187
6437
  },
6188
6438
  "OrderBook": {
@@ -6325,6 +6575,46 @@
6325
6575
  "nonce"
6326
6576
  ]
6327
6577
  },
6578
+ "OrderBookDepthWithBeginNonce": {
6579
+ "type": "object",
6580
+ "properties": {
6581
+ "asks": {
6582
+ "type": "array",
6583
+ "items": {
6584
+ "$ref": "#/definitions/PriceLevel"
6585
+ }
6586
+ },
6587
+ "bids": {
6588
+ "type": "array",
6589
+ "items": {
6590
+ "$ref": "#/definitions/PriceLevel"
6591
+ }
6592
+ },
6593
+ "offset": {
6594
+ "type": "integer",
6595
+ "format": "int64",
6596
+ "example": "0"
6597
+ },
6598
+ "nonce": {
6599
+ "type": "integer",
6600
+ "format": "int64",
6601
+ "example": "0"
6602
+ },
6603
+ "begin_nonce": {
6604
+ "type": "integer",
6605
+ "format": "int64",
6606
+ "example": "0"
6607
+ }
6608
+ },
6609
+ "title": "OrderBookDepthWithBeginNonce",
6610
+ "required": [
6611
+ "asks",
6612
+ "bids",
6613
+ "offset",
6614
+ "nonce",
6615
+ "begin_nonce"
6616
+ ]
6617
+ },
6328
6618
  "OrderBookDetails": {
6329
6619
  "type": "object",
6330
6620
  "properties": {
@@ -7291,27 +7581,15 @@
7291
7581
  "new_tier"
7292
7582
  ]
7293
7583
  },
7294
- "ReqCreateAirdropPercentages": {
7584
+ "ReqCreateAirdropAllocations": {
7295
7585
  "type": "object",
7296
7586
  "properties": {
7297
7587
  "l1_address": {
7298
7588
  "type": "string"
7299
7589
  },
7300
- "percentages": {
7590
+ "allocations": {
7301
7591
  "type": "string"
7302
7592
  },
7303
- "nonce": {
7304
- "type": "integer",
7305
- "format": "int64"
7306
- },
7307
- "account_index": {
7308
- "type": "integer",
7309
- "format": "int64"
7310
- },
7311
- "api_key_index": {
7312
- "type": "integer",
7313
- "format": "uint8"
7314
- },
7315
7593
  "signature": {
7316
7594
  "type": "string"
7317
7595
  },
@@ -7319,10 +7597,10 @@
7319
7597
  "type": "string"
7320
7598
  }
7321
7599
  },
7322
- "title": "ReqCreateAirdropPercentages",
7600
+ "title": "ReqCreateAirdropAllocations",
7323
7601
  "required": [
7324
7602
  "l1_address",
7325
- "percentages",
7603
+ "allocations",
7326
7604
  "signature"
7327
7605
  ]
7328
7606
  },
@@ -7680,7 +7958,7 @@
7680
7958
  },
7681
7959
  "title": "ReqGetAccountTxs"
7682
7960
  },
7683
- "ReqGetAirdropPercentages": {
7961
+ "ReqGetAirdropAllocations": {
7684
7962
  "type": "object",
7685
7963
  "properties": {
7686
7964
  "l1_address": {
@@ -7690,7 +7968,7 @@
7690
7968
  "type": "string"
7691
7969
  }
7692
7970
  },
7693
- "title": "ReqGetAirdropPercentages",
7971
+ "title": "ReqGetAirdropAllocations",
7694
7972
  "required": [
7695
7973
  "l1_address"
7696
7974
  ]
@@ -7790,6 +8068,56 @@
7790
8068
  "value"
7791
8069
  ]
7792
8070
  },
8071
+ "ReqGetCandles": {
8072
+ "type": "object",
8073
+ "properties": {
8074
+ "market_id": {
8075
+ "type": "integer",
8076
+ "format": "int16"
8077
+ },
8078
+ "resolution": {
8079
+ "type": "string",
8080
+ "enum": [
8081
+ "1m",
8082
+ "5m",
8083
+ "15m",
8084
+ "30m",
8085
+ "1h",
8086
+ "4h",
8087
+ "12h",
8088
+ "1d",
8089
+ "1w"
8090
+ ]
8091
+ },
8092
+ "start_timestamp": {
8093
+ "type": "integer",
8094
+ "format": "int64",
8095
+ "maximum": 5000000000000
8096
+ },
8097
+ "end_timestamp": {
8098
+ "type": "integer",
8099
+ "format": "int64",
8100
+ "maximum": 5000000000000
8101
+ },
8102
+ "count_back": {
8103
+ "type": "integer",
8104
+ "format": "int64"
8105
+ },
8106
+ "set_timestamp_to_end": {
8107
+ "type": "boolean",
8108
+ "format": "boolean",
8109
+ "default": "false"
8110
+ }
8111
+ },
8112
+ "title": "ReqGetCandles",
8113
+ "required": [
8114
+ "market_id",
8115
+ "resolution",
8116
+ "start_timestamp",
8117
+ "end_timestamp",
8118
+ "count_back"
8119
+ ]
8120
+ },
7793
8121
  "ReqGetCandlesticks": {
7794
8122
  "type": "object",
7795
8123
  "properties": {
@@ -9193,6 +9521,11 @@
9193
9521
  "type": "integer",
9194
9522
  "format": "int64",
9195
9523
  "example": "1640995200"
9524
+ },
9525
+ "transaction_time": {
9526
+ "type": "integer",
9527
+ "format": "int64",
9528
+ "example": "1257894000000000"
9196
9529
  }
9197
9530
  },
9198
9531
  "title": "SimpleOrder",
@@ -9203,7 +9536,8 @@
9203
9536
  "initial_base_amount",
9204
9537
  "remaining_base_amount",
9205
9538
  "price",
9206
- "order_expiry"
9539
+ "order_expiry",
9540
+ "transaction_time"
9207
9541
  ]
9208
9542
  },
9209
9543
  "SpotMarketStats": {
@@ -9636,6 +9970,11 @@
9636
9970
  "type": "boolean",
9637
9971
  "format": "boolean",
9638
9972
  "example": "true"
9973
+ },
9974
+ "transaction_time": {
9975
+ "type": "integer",
9976
+ "format": "int64",
9977
+ "example": "1257894000000000"
9639
9978
  }
9640
9979
  },
9641
9980
  "title": "Trade",
@@ -9663,7 +10002,8 @@
9663
10002
  "maker_position_size_before",
9664
10003
  "maker_entry_quote_before",
9665
10004
  "maker_initial_margin_fraction_before",
9666
- "maker_position_sign_changed"
10005
+ "maker_position_sign_changed",
10006
+ "transaction_time"
9667
10007
  ]
9668
10008
  },
9669
10009
  "Trades": {
@@ -9912,6 +10252,11 @@
9912
10252
  "type": "integer",
9913
10253
  "format": "uint8",
9914
10254
  "example": "0"
10255
+ },
10256
+ "transaction_time": {
10257
+ "type": "integer",
10258
+ "format": "int64",
10259
+ "example": "1257894000000000"
9915
10260
  }
9916
10261
  },
9917
10262
  "title": "Tx",
@@ -9931,7 +10276,8 @@
9931
10276
  "executed_at",
9932
10277
  "sequence_index",
9933
10278
  "parent_hash",
9934
- "api_key_index"
10279
+ "api_key_index",
10280
+ "transaction_time"
9935
10281
  ]
9936
10282
  },
9937
10283
  "TxHash": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {