zklighter-perps 1.0.33 → 1.0.35
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-generator/FILES +5 -1
- package/apis/AccountApi.ts +58 -0
- package/apis/TransactionApi.ts +94 -73
- package/models/AccountMetadata.ts +70 -0
- package/models/AccountStats.ts +4 -4
- package/models/DetailedAccount.ts +33 -0
- package/models/PublicPool.ts +166 -0
- package/models/PublicPoolInfo.ts +97 -0
- package/models/PublicPools.ts +85 -0
- package/models/ReqGetPublicPools.ts +70 -0
- package/models/index.ts +5 -1
- package/openapi.json +291 -63
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -871,43 +871,6 @@
|
|
|
871
871
|
"description": "Get fundings"
|
|
872
872
|
}
|
|
873
873
|
},
|
|
874
|
-
"/api/v1/l2Signature": {
|
|
875
|
-
"post": {
|
|
876
|
-
"summary": "l2Signature",
|
|
877
|
-
"operationId": "l2Signature",
|
|
878
|
-
"responses": {
|
|
879
|
-
"200": {
|
|
880
|
-
"description": "A successful response.",
|
|
881
|
-
"schema": {
|
|
882
|
-
"$ref": "#/definitions/SignBody"
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
"400": {
|
|
886
|
-
"description": "Bad request",
|
|
887
|
-
"schema": {
|
|
888
|
-
"$ref": "#/definitions/ResultCode"
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
"parameters": [
|
|
893
|
-
{
|
|
894
|
-
"name": "body",
|
|
895
|
-
"in": "body",
|
|
896
|
-
"required": true,
|
|
897
|
-
"schema": {
|
|
898
|
-
"$ref": "#/definitions/ReqSendTx"
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
],
|
|
902
|
-
"tags": [
|
|
903
|
-
"transaction"
|
|
904
|
-
],
|
|
905
|
-
"consumes": [
|
|
906
|
-
"multipart/form-data"
|
|
907
|
-
],
|
|
908
|
-
"description": "Get transaction signature body"
|
|
909
|
-
}
|
|
910
|
-
},
|
|
911
874
|
"/api/v1/layer1BasicInfo": {
|
|
912
875
|
"get": {
|
|
913
876
|
"summary": "layer1BasicInfo",
|
|
@@ -1321,6 +1284,51 @@
|
|
|
1321
1284
|
"description": "Get account PnL chart"
|
|
1322
1285
|
}
|
|
1323
1286
|
},
|
|
1287
|
+
"/api/v1/publicPools": {
|
|
1288
|
+
"get": {
|
|
1289
|
+
"summary": "publicPools",
|
|
1290
|
+
"operationId": "publicPools",
|
|
1291
|
+
"responses": {
|
|
1292
|
+
"200": {
|
|
1293
|
+
"description": "A successful response.",
|
|
1294
|
+
"schema": {
|
|
1295
|
+
"$ref": "#/definitions/PublicPools"
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
"400": {
|
|
1299
|
+
"description": "Bad request",
|
|
1300
|
+
"schema": {
|
|
1301
|
+
"$ref": "#/definitions/ResultCode"
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"parameters": [
|
|
1306
|
+
{
|
|
1307
|
+
"name": "index",
|
|
1308
|
+
"in": "query",
|
|
1309
|
+
"required": true,
|
|
1310
|
+
"type": "integer",
|
|
1311
|
+
"format": "int64"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"name": "limit",
|
|
1315
|
+
"in": "query",
|
|
1316
|
+
"required": true,
|
|
1317
|
+
"type": "integer",
|
|
1318
|
+
"format": "int64",
|
|
1319
|
+
"minimum": 1,
|
|
1320
|
+
"maximum": 100
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"tags": [
|
|
1324
|
+
"account"
|
|
1325
|
+
],
|
|
1326
|
+
"consumes": [
|
|
1327
|
+
"multipart/form-data"
|
|
1328
|
+
],
|
|
1329
|
+
"description": "Get public pools"
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1324
1332
|
"/api/v1/recentTrades": {
|
|
1325
1333
|
"get": {
|
|
1326
1334
|
"summary": "recentTrades",
|
|
@@ -1494,6 +1502,43 @@
|
|
|
1494
1502
|
"description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
|
|
1495
1503
|
}
|
|
1496
1504
|
},
|
|
1505
|
+
"/api/v1/setAccountMetadata": {
|
|
1506
|
+
"post": {
|
|
1507
|
+
"summary": "setAccountMetadata",
|
|
1508
|
+
"operationId": "setAccountMetadata",
|
|
1509
|
+
"responses": {
|
|
1510
|
+
"200": {
|
|
1511
|
+
"description": "A successful response.",
|
|
1512
|
+
"schema": {
|
|
1513
|
+
"$ref": "#/definitions/ResultCode"
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"400": {
|
|
1517
|
+
"description": "Bad request",
|
|
1518
|
+
"schema": {
|
|
1519
|
+
"$ref": "#/definitions/ResultCode"
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
"parameters": [
|
|
1524
|
+
{
|
|
1525
|
+
"name": "body",
|
|
1526
|
+
"in": "body",
|
|
1527
|
+
"required": true,
|
|
1528
|
+
"schema": {
|
|
1529
|
+
"$ref": "#/definitions/ReqSetAccountMetadata"
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
"tags": [
|
|
1534
|
+
"transaction"
|
|
1535
|
+
],
|
|
1536
|
+
"consumes": [
|
|
1537
|
+
"multipart/form-data"
|
|
1538
|
+
],
|
|
1539
|
+
"description": "Set account metadata"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1497
1542
|
"/api/v1/trades": {
|
|
1498
1543
|
"get": {
|
|
1499
1544
|
"summary": "trades",
|
|
@@ -1728,7 +1773,7 @@
|
|
|
1728
1773
|
},
|
|
1729
1774
|
"status": {
|
|
1730
1775
|
"type": "integer",
|
|
1731
|
-
"format": "
|
|
1776
|
+
"format": "uint8",
|
|
1732
1777
|
"example": "1"
|
|
1733
1778
|
},
|
|
1734
1779
|
"collateral": {
|
|
@@ -1816,6 +1861,22 @@
|
|
|
1816
1861
|
"open_position_quote"
|
|
1817
1862
|
]
|
|
1818
1863
|
},
|
|
1864
|
+
"AccountMetadata": {
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"properties": {
|
|
1867
|
+
"name": {
|
|
1868
|
+
"type": "string"
|
|
1869
|
+
},
|
|
1870
|
+
"description": {
|
|
1871
|
+
"type": "string"
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
"title": "AccountMetadata",
|
|
1875
|
+
"required": [
|
|
1876
|
+
"name",
|
|
1877
|
+
"description"
|
|
1878
|
+
]
|
|
1879
|
+
},
|
|
1819
1880
|
"AccountPnL": {
|
|
1820
1881
|
"type": "object",
|
|
1821
1882
|
"properties": {
|
|
@@ -1912,7 +1973,7 @@
|
|
|
1912
1973
|
"type": "string",
|
|
1913
1974
|
"example": "1.0"
|
|
1914
1975
|
},
|
|
1915
|
-
"
|
|
1976
|
+
"available_balance": {
|
|
1916
1977
|
"type": "string",
|
|
1917
1978
|
"example": "199955"
|
|
1918
1979
|
},
|
|
@@ -1929,7 +1990,7 @@
|
|
|
1929
1990
|
"required": [
|
|
1930
1991
|
"portfolio_value",
|
|
1931
1992
|
"leverage",
|
|
1932
|
-
"
|
|
1993
|
+
"available_balance",
|
|
1933
1994
|
"margin_usage",
|
|
1934
1995
|
"buying_power"
|
|
1935
1996
|
]
|
|
@@ -2258,13 +2319,19 @@
|
|
|
2258
2319
|
},
|
|
2259
2320
|
"status": {
|
|
2260
2321
|
"type": "integer",
|
|
2261
|
-
"format": "
|
|
2322
|
+
"format": "uint8",
|
|
2262
2323
|
"example": "1"
|
|
2263
2324
|
},
|
|
2264
2325
|
"collateral": {
|
|
2265
2326
|
"type": "string",
|
|
2266
2327
|
"example": "46342"
|
|
2267
2328
|
},
|
|
2329
|
+
"name": {
|
|
2330
|
+
"type": "string"
|
|
2331
|
+
},
|
|
2332
|
+
"description": {
|
|
2333
|
+
"type": "string"
|
|
2334
|
+
},
|
|
2268
2335
|
"positions": {
|
|
2269
2336
|
"type": "array",
|
|
2270
2337
|
"items": {
|
|
@@ -2281,6 +2348,9 @@
|
|
|
2281
2348
|
"$ref": "#/definitions/AccountMarketStats"
|
|
2282
2349
|
}
|
|
2283
2350
|
},
|
|
2351
|
+
"pool_info": {
|
|
2352
|
+
"$ref": "#/definitions/PublicPoolInfo"
|
|
2353
|
+
},
|
|
2284
2354
|
"shares": {
|
|
2285
2355
|
"type": "array",
|
|
2286
2356
|
"items": {
|
|
@@ -2298,9 +2368,12 @@
|
|
|
2298
2368
|
"open_order_count",
|
|
2299
2369
|
"status",
|
|
2300
2370
|
"collateral",
|
|
2371
|
+
"name",
|
|
2372
|
+
"description",
|
|
2301
2373
|
"positions",
|
|
2302
2374
|
"total_asset_value",
|
|
2303
2375
|
"market_stats",
|
|
2376
|
+
"pool_info",
|
|
2304
2377
|
"shares"
|
|
2305
2378
|
]
|
|
2306
2379
|
},
|
|
@@ -3433,6 +3506,113 @@
|
|
|
3433
3506
|
"size"
|
|
3434
3507
|
]
|
|
3435
3508
|
},
|
|
3509
|
+
"PublicPool": {
|
|
3510
|
+
"type": "object",
|
|
3511
|
+
"properties": {
|
|
3512
|
+
"code": {
|
|
3513
|
+
"type": "integer",
|
|
3514
|
+
"format": "int32",
|
|
3515
|
+
"example": "100"
|
|
3516
|
+
},
|
|
3517
|
+
"message": {
|
|
3518
|
+
"type": "string"
|
|
3519
|
+
},
|
|
3520
|
+
"account_type": {
|
|
3521
|
+
"type": "integer",
|
|
3522
|
+
"format": "uint8",
|
|
3523
|
+
"example": "1"
|
|
3524
|
+
},
|
|
3525
|
+
"index": {
|
|
3526
|
+
"type": "integer",
|
|
3527
|
+
"format": "int64",
|
|
3528
|
+
"example": "1"
|
|
3529
|
+
},
|
|
3530
|
+
"l1_address": {
|
|
3531
|
+
"type": "string",
|
|
3532
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3533
|
+
},
|
|
3534
|
+
"cancel_all_time": {
|
|
3535
|
+
"type": "integer",
|
|
3536
|
+
"format": "int64",
|
|
3537
|
+
"example": "1640995200"
|
|
3538
|
+
},
|
|
3539
|
+
"open_order_count": {
|
|
3540
|
+
"type": "integer",
|
|
3541
|
+
"format": "int64",
|
|
3542
|
+
"example": "100"
|
|
3543
|
+
},
|
|
3544
|
+
"status": {
|
|
3545
|
+
"type": "integer",
|
|
3546
|
+
"format": "uint8",
|
|
3547
|
+
"example": "1"
|
|
3548
|
+
},
|
|
3549
|
+
"collateral": {
|
|
3550
|
+
"type": "string",
|
|
3551
|
+
"example": "46342"
|
|
3552
|
+
},
|
|
3553
|
+
"name": {
|
|
3554
|
+
"type": "string"
|
|
3555
|
+
},
|
|
3556
|
+
"description": {
|
|
3557
|
+
"type": "string"
|
|
3558
|
+
},
|
|
3559
|
+
"pool_info": {
|
|
3560
|
+
"$ref": "#/definitions/PublicPoolInfo"
|
|
3561
|
+
}
|
|
3562
|
+
},
|
|
3563
|
+
"title": "PublicPool",
|
|
3564
|
+
"required": [
|
|
3565
|
+
"code",
|
|
3566
|
+
"account_type",
|
|
3567
|
+
"index",
|
|
3568
|
+
"l1_address",
|
|
3569
|
+
"cancel_all_time",
|
|
3570
|
+
"open_order_count",
|
|
3571
|
+
"status",
|
|
3572
|
+
"collateral",
|
|
3573
|
+
"name",
|
|
3574
|
+
"description",
|
|
3575
|
+
"pool_info"
|
|
3576
|
+
]
|
|
3577
|
+
},
|
|
3578
|
+
"PublicPoolInfo": {
|
|
3579
|
+
"type": "object",
|
|
3580
|
+
"properties": {
|
|
3581
|
+
"ppi_s": {
|
|
3582
|
+
"type": "integer",
|
|
3583
|
+
"format": "uint8",
|
|
3584
|
+
"example": "0"
|
|
3585
|
+
},
|
|
3586
|
+
"ppi_of": {
|
|
3587
|
+
"type": "integer",
|
|
3588
|
+
"format": "int64",
|
|
3589
|
+
"example": "100"
|
|
3590
|
+
},
|
|
3591
|
+
"ppi_mosr": {
|
|
3592
|
+
"type": "integer",
|
|
3593
|
+
"format": "int64",
|
|
3594
|
+
"example": "200"
|
|
3595
|
+
},
|
|
3596
|
+
"ppi_tsa": {
|
|
3597
|
+
"type": "integer",
|
|
3598
|
+
"format": "int64",
|
|
3599
|
+
"example": "100000"
|
|
3600
|
+
},
|
|
3601
|
+
"ppi_os": {
|
|
3602
|
+
"type": "integer",
|
|
3603
|
+
"format": "int64",
|
|
3604
|
+
"example": "20000"
|
|
3605
|
+
}
|
|
3606
|
+
},
|
|
3607
|
+
"title": "PublicPoolInfo",
|
|
3608
|
+
"required": [
|
|
3609
|
+
"ppi_s",
|
|
3610
|
+
"ppi_of",
|
|
3611
|
+
"ppi_mosr",
|
|
3612
|
+
"ppi_tsa",
|
|
3613
|
+
"ppi_os"
|
|
3614
|
+
]
|
|
3615
|
+
},
|
|
3436
3616
|
"PublicPoolShare": {
|
|
3437
3617
|
"type": "object",
|
|
3438
3618
|
"properties": {
|
|
@@ -3458,6 +3638,30 @@
|
|
|
3458
3638
|
"entry_usdc"
|
|
3459
3639
|
]
|
|
3460
3640
|
},
|
|
3641
|
+
"PublicPools": {
|
|
3642
|
+
"type": "object",
|
|
3643
|
+
"properties": {
|
|
3644
|
+
"code": {
|
|
3645
|
+
"type": "integer",
|
|
3646
|
+
"format": "int32",
|
|
3647
|
+
"example": "100"
|
|
3648
|
+
},
|
|
3649
|
+
"message": {
|
|
3650
|
+
"type": "string"
|
|
3651
|
+
},
|
|
3652
|
+
"public_pools": {
|
|
3653
|
+
"type": "array",
|
|
3654
|
+
"items": {
|
|
3655
|
+
"$ref": "#/definitions/PublicPool"
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
"title": "PublicPools",
|
|
3660
|
+
"required": [
|
|
3661
|
+
"code",
|
|
3662
|
+
"public_pools"
|
|
3663
|
+
]
|
|
3664
|
+
},
|
|
3461
3665
|
"ReqDoFaucet": {
|
|
3462
3666
|
"type": "object",
|
|
3463
3667
|
"properties": {
|
|
@@ -3954,6 +4158,26 @@
|
|
|
3954
4158
|
"tx_type"
|
|
3955
4159
|
]
|
|
3956
4160
|
},
|
|
4161
|
+
"ReqGetPublicPools": {
|
|
4162
|
+
"type": "object",
|
|
4163
|
+
"properties": {
|
|
4164
|
+
"index": {
|
|
4165
|
+
"type": "integer",
|
|
4166
|
+
"format": "int64"
|
|
4167
|
+
},
|
|
4168
|
+
"limit": {
|
|
4169
|
+
"type": "integer",
|
|
4170
|
+
"format": "int64",
|
|
4171
|
+
"maximum": 100,
|
|
4172
|
+
"minimum": 1
|
|
4173
|
+
}
|
|
4174
|
+
},
|
|
4175
|
+
"title": "ReqGetPublicPools",
|
|
4176
|
+
"required": [
|
|
4177
|
+
"index",
|
|
4178
|
+
"limit"
|
|
4179
|
+
]
|
|
4180
|
+
},
|
|
3957
4181
|
"ReqGetRangeWithCursor": {
|
|
3958
4182
|
"type": "object",
|
|
3959
4183
|
"properties": {
|
|
@@ -4182,6 +4406,32 @@
|
|
|
4182
4406
|
"tx_infos"
|
|
4183
4407
|
]
|
|
4184
4408
|
},
|
|
4409
|
+
"ReqSetAccountMetadata": {
|
|
4410
|
+
"type": "object",
|
|
4411
|
+
"properties": {
|
|
4412
|
+
"account_index": {
|
|
4413
|
+
"type": "integer",
|
|
4414
|
+
"format": "int64"
|
|
4415
|
+
},
|
|
4416
|
+
"api_key_index": {
|
|
4417
|
+
"type": "integer",
|
|
4418
|
+
"format": "uint8"
|
|
4419
|
+
},
|
|
4420
|
+
"metadata": {
|
|
4421
|
+
"type": "string"
|
|
4422
|
+
},
|
|
4423
|
+
"signature": {
|
|
4424
|
+
"type": "string"
|
|
4425
|
+
}
|
|
4426
|
+
},
|
|
4427
|
+
"title": "ReqSetAccountMetadata",
|
|
4428
|
+
"required": [
|
|
4429
|
+
"account_index",
|
|
4430
|
+
"api_key_index",
|
|
4431
|
+
"metadata",
|
|
4432
|
+
"signature"
|
|
4433
|
+
]
|
|
4434
|
+
},
|
|
4185
4435
|
"ResultCode": {
|
|
4186
4436
|
"type": "object",
|
|
4187
4437
|
"properties": {
|
|
@@ -4261,28 +4511,6 @@
|
|
|
4261
4511
|
"rollbacks"
|
|
4262
4512
|
]
|
|
4263
4513
|
},
|
|
4264
|
-
"SignBody": {
|
|
4265
|
-
"type": "object",
|
|
4266
|
-
"properties": {
|
|
4267
|
-
"code": {
|
|
4268
|
-
"type": "integer",
|
|
4269
|
-
"format": "int32",
|
|
4270
|
-
"example": "100"
|
|
4271
|
-
},
|
|
4272
|
-
"message": {
|
|
4273
|
-
"type": "string"
|
|
4274
|
-
},
|
|
4275
|
-
"sign_body": {
|
|
4276
|
-
"type": "string",
|
|
4277
|
-
"example": "success"
|
|
4278
|
-
}
|
|
4279
|
-
},
|
|
4280
|
-
"title": "SignBody",
|
|
4281
|
-
"required": [
|
|
4282
|
-
"code",
|
|
4283
|
-
"sign_body"
|
|
4284
|
-
]
|
|
4285
|
-
},
|
|
4286
4514
|
"SimpleOrder": {
|
|
4287
4515
|
"type": "object",
|
|
4288
4516
|
"properties": {
|