@proton/wrap-constants 0.2.81 → 0.2.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.
- package/dist/index.d.ts +176 -131
- package/dist/index.js +29 -16
- package/dist/index.mjs +27 -14
- package/package.json +2 -2
- package/src/parsers/dex.ts +33 -29
package/dist/index.d.ts
CHANGED
|
@@ -6460,10 +6460,10 @@ declare type GetOHLCVResponse = z.infer<typeof getOhlcvResponseParser>;
|
|
|
6460
6460
|
* Order History
|
|
6461
6461
|
*/
|
|
6462
6462
|
declare const orderHistoryParser: z.ZodObject<{
|
|
6463
|
-
|
|
6464
|
-
block_num: z.ZodNumber;
|
|
6463
|
+
block_num: z.ZodString;
|
|
6465
6464
|
block_time: z.ZodString;
|
|
6466
|
-
order_id: z.
|
|
6465
|
+
order_id: z.ZodString;
|
|
6466
|
+
ordinal_order_id: z.ZodString;
|
|
6467
6467
|
market_id: z.ZodNumber;
|
|
6468
6468
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6469
6469
|
quantity_curr: z.ZodNumber;
|
|
@@ -6475,17 +6475,18 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6475
6475
|
fill_type: z.ZodNumber;
|
|
6476
6476
|
status: z.ZodString;
|
|
6477
6477
|
quantity_change: z.ZodNumber;
|
|
6478
|
-
trx_id: z.ZodString;
|
|
6479
6478
|
filled_total: z.ZodOptional<z.ZodNumber>;
|
|
6480
6479
|
filled_amount: z.ZodOptional<z.ZodNumber>;
|
|
6481
6480
|
filled_fee: z.ZodOptional<z.ZodNumber>;
|
|
6481
|
+
seq: z.ZodString;
|
|
6482
|
+
trx_id: z.ZodString;
|
|
6482
6483
|
}, "strip", z.ZodTypeAny, {
|
|
6483
6484
|
status: string;
|
|
6484
6485
|
price: number;
|
|
6485
|
-
|
|
6486
|
-
block_num: number;
|
|
6486
|
+
block_num: string;
|
|
6487
6487
|
block_time: string;
|
|
6488
|
-
order_id:
|
|
6488
|
+
order_id: string;
|
|
6489
|
+
ordinal_order_id: string;
|
|
6489
6490
|
market_id: number;
|
|
6490
6491
|
quantity_curr: number;
|
|
6491
6492
|
account_name: string;
|
|
@@ -6494,6 +6495,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6494
6495
|
trigger_price: number;
|
|
6495
6496
|
fill_type: number;
|
|
6496
6497
|
quantity_change: number;
|
|
6498
|
+
seq: string;
|
|
6497
6499
|
trx_id: string;
|
|
6498
6500
|
quantity_init?: number | undefined;
|
|
6499
6501
|
filled_total?: number | undefined;
|
|
@@ -6502,10 +6504,10 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6502
6504
|
}, {
|
|
6503
6505
|
status: string;
|
|
6504
6506
|
price: number;
|
|
6505
|
-
|
|
6506
|
-
block_num: number;
|
|
6507
|
+
block_num: string;
|
|
6507
6508
|
block_time: string;
|
|
6508
|
-
order_id:
|
|
6509
|
+
order_id: string;
|
|
6510
|
+
ordinal_order_id: string;
|
|
6509
6511
|
market_id: number;
|
|
6510
6512
|
quantity_curr: number;
|
|
6511
6513
|
account_name: string;
|
|
@@ -6514,6 +6516,7 @@ declare const orderHistoryParser: z.ZodObject<{
|
|
|
6514
6516
|
trigger_price: number;
|
|
6515
6517
|
fill_type: number;
|
|
6516
6518
|
quantity_change: number;
|
|
6519
|
+
seq: string;
|
|
6517
6520
|
trx_id: string;
|
|
6518
6521
|
quantity_init?: number | undefined;
|
|
6519
6522
|
filled_total?: number | undefined;
|
|
@@ -6542,10 +6545,10 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6542
6545
|
sync: z.ZodNumber;
|
|
6543
6546
|
count: z.ZodNumber;
|
|
6544
6547
|
data: z.ZodArray<z.ZodObject<{
|
|
6545
|
-
|
|
6546
|
-
block_num: z.ZodNumber;
|
|
6548
|
+
block_num: z.ZodString;
|
|
6547
6549
|
block_time: z.ZodString;
|
|
6548
|
-
order_id: z.
|
|
6550
|
+
order_id: z.ZodString;
|
|
6551
|
+
ordinal_order_id: z.ZodString;
|
|
6549
6552
|
market_id: z.ZodNumber;
|
|
6550
6553
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6551
6554
|
quantity_curr: z.ZodNumber;
|
|
@@ -6557,17 +6560,18 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6557
6560
|
fill_type: z.ZodNumber;
|
|
6558
6561
|
status: z.ZodString;
|
|
6559
6562
|
quantity_change: z.ZodNumber;
|
|
6560
|
-
trx_id: z.ZodString;
|
|
6561
6563
|
filled_total: z.ZodOptional<z.ZodNumber>;
|
|
6562
6564
|
filled_amount: z.ZodOptional<z.ZodNumber>;
|
|
6563
6565
|
filled_fee: z.ZodOptional<z.ZodNumber>;
|
|
6566
|
+
seq: z.ZodString;
|
|
6567
|
+
trx_id: z.ZodString;
|
|
6564
6568
|
}, "strip", z.ZodTypeAny, {
|
|
6565
6569
|
status: string;
|
|
6566
6570
|
price: number;
|
|
6567
|
-
|
|
6568
|
-
block_num: number;
|
|
6571
|
+
block_num: string;
|
|
6569
6572
|
block_time: string;
|
|
6570
|
-
order_id:
|
|
6573
|
+
order_id: string;
|
|
6574
|
+
ordinal_order_id: string;
|
|
6571
6575
|
market_id: number;
|
|
6572
6576
|
quantity_curr: number;
|
|
6573
6577
|
account_name: string;
|
|
@@ -6576,6 +6580,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6576
6580
|
trigger_price: number;
|
|
6577
6581
|
fill_type: number;
|
|
6578
6582
|
quantity_change: number;
|
|
6583
|
+
seq: string;
|
|
6579
6584
|
trx_id: string;
|
|
6580
6585
|
quantity_init?: number | undefined;
|
|
6581
6586
|
filled_total?: number | undefined;
|
|
@@ -6584,10 +6589,10 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6584
6589
|
}, {
|
|
6585
6590
|
status: string;
|
|
6586
6591
|
price: number;
|
|
6587
|
-
|
|
6588
|
-
block_num: number;
|
|
6592
|
+
block_num: string;
|
|
6589
6593
|
block_time: string;
|
|
6590
|
-
order_id:
|
|
6594
|
+
order_id: string;
|
|
6595
|
+
ordinal_order_id: string;
|
|
6591
6596
|
market_id: number;
|
|
6592
6597
|
quantity_curr: number;
|
|
6593
6598
|
account_name: string;
|
|
@@ -6596,6 +6601,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6596
6601
|
trigger_price: number;
|
|
6597
6602
|
fill_type: number;
|
|
6598
6603
|
quantity_change: number;
|
|
6604
|
+
seq: string;
|
|
6599
6605
|
trx_id: string;
|
|
6600
6606
|
quantity_init?: number | undefined;
|
|
6601
6607
|
filled_total?: number | undefined;
|
|
@@ -6606,10 +6612,10 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6606
6612
|
data: {
|
|
6607
6613
|
status: string;
|
|
6608
6614
|
price: number;
|
|
6609
|
-
|
|
6610
|
-
block_num: number;
|
|
6615
|
+
block_num: string;
|
|
6611
6616
|
block_time: string;
|
|
6612
|
-
order_id:
|
|
6617
|
+
order_id: string;
|
|
6618
|
+
ordinal_order_id: string;
|
|
6613
6619
|
market_id: number;
|
|
6614
6620
|
quantity_curr: number;
|
|
6615
6621
|
account_name: string;
|
|
@@ -6618,6 +6624,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6618
6624
|
trigger_price: number;
|
|
6619
6625
|
fill_type: number;
|
|
6620
6626
|
quantity_change: number;
|
|
6627
|
+
seq: string;
|
|
6621
6628
|
trx_id: string;
|
|
6622
6629
|
quantity_init?: number | undefined;
|
|
6623
6630
|
filled_total?: number | undefined;
|
|
@@ -6630,10 +6637,10 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6630
6637
|
data: {
|
|
6631
6638
|
status: string;
|
|
6632
6639
|
price: number;
|
|
6633
|
-
|
|
6634
|
-
block_num: number;
|
|
6640
|
+
block_num: string;
|
|
6635
6641
|
block_time: string;
|
|
6636
|
-
order_id:
|
|
6642
|
+
order_id: string;
|
|
6643
|
+
ordinal_order_id: string;
|
|
6637
6644
|
market_id: number;
|
|
6638
6645
|
quantity_curr: number;
|
|
6639
6646
|
account_name: string;
|
|
@@ -6642,6 +6649,7 @@ declare const getOpenOrdersResponseParser: z.ZodObject<{
|
|
|
6642
6649
|
trigger_price: number;
|
|
6643
6650
|
fill_type: number;
|
|
6644
6651
|
quantity_change: number;
|
|
6652
|
+
seq: string;
|
|
6645
6653
|
trx_id: string;
|
|
6646
6654
|
quantity_init?: number | undefined;
|
|
6647
6655
|
filled_total?: number | undefined;
|
|
@@ -6679,10 +6687,10 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6679
6687
|
sync: z.ZodNumber;
|
|
6680
6688
|
count: z.ZodNumber;
|
|
6681
6689
|
data: z.ZodArray<z.ZodObject<{
|
|
6682
|
-
|
|
6683
|
-
block_num: z.ZodNumber;
|
|
6690
|
+
block_num: z.ZodString;
|
|
6684
6691
|
block_time: z.ZodString;
|
|
6685
|
-
order_id: z.
|
|
6692
|
+
order_id: z.ZodString;
|
|
6693
|
+
ordinal_order_id: z.ZodString;
|
|
6686
6694
|
market_id: z.ZodNumber;
|
|
6687
6695
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6688
6696
|
quantity_curr: z.ZodNumber;
|
|
@@ -6694,17 +6702,18 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6694
6702
|
fill_type: z.ZodNumber;
|
|
6695
6703
|
status: z.ZodString;
|
|
6696
6704
|
quantity_change: z.ZodNumber;
|
|
6697
|
-
trx_id: z.ZodString;
|
|
6698
6705
|
filled_total: z.ZodOptional<z.ZodNumber>;
|
|
6699
6706
|
filled_amount: z.ZodOptional<z.ZodNumber>;
|
|
6700
6707
|
filled_fee: z.ZodOptional<z.ZodNumber>;
|
|
6708
|
+
seq: z.ZodString;
|
|
6709
|
+
trx_id: z.ZodString;
|
|
6701
6710
|
}, "strip", z.ZodTypeAny, {
|
|
6702
6711
|
status: string;
|
|
6703
6712
|
price: number;
|
|
6704
|
-
|
|
6705
|
-
block_num: number;
|
|
6713
|
+
block_num: string;
|
|
6706
6714
|
block_time: string;
|
|
6707
|
-
order_id:
|
|
6715
|
+
order_id: string;
|
|
6716
|
+
ordinal_order_id: string;
|
|
6708
6717
|
market_id: number;
|
|
6709
6718
|
quantity_curr: number;
|
|
6710
6719
|
account_name: string;
|
|
@@ -6713,6 +6722,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6713
6722
|
trigger_price: number;
|
|
6714
6723
|
fill_type: number;
|
|
6715
6724
|
quantity_change: number;
|
|
6725
|
+
seq: string;
|
|
6716
6726
|
trx_id: string;
|
|
6717
6727
|
quantity_init?: number | undefined;
|
|
6718
6728
|
filled_total?: number | undefined;
|
|
@@ -6721,10 +6731,10 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6721
6731
|
}, {
|
|
6722
6732
|
status: string;
|
|
6723
6733
|
price: number;
|
|
6724
|
-
|
|
6725
|
-
block_num: number;
|
|
6734
|
+
block_num: string;
|
|
6726
6735
|
block_time: string;
|
|
6727
|
-
order_id:
|
|
6736
|
+
order_id: string;
|
|
6737
|
+
ordinal_order_id: string;
|
|
6728
6738
|
market_id: number;
|
|
6729
6739
|
quantity_curr: number;
|
|
6730
6740
|
account_name: string;
|
|
@@ -6733,6 +6743,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6733
6743
|
trigger_price: number;
|
|
6734
6744
|
fill_type: number;
|
|
6735
6745
|
quantity_change: number;
|
|
6746
|
+
seq: string;
|
|
6736
6747
|
trx_id: string;
|
|
6737
6748
|
quantity_init?: number | undefined;
|
|
6738
6749
|
filled_total?: number | undefined;
|
|
@@ -6743,10 +6754,10 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6743
6754
|
data: {
|
|
6744
6755
|
status: string;
|
|
6745
6756
|
price: number;
|
|
6746
|
-
|
|
6747
|
-
block_num: number;
|
|
6757
|
+
block_num: string;
|
|
6748
6758
|
block_time: string;
|
|
6749
|
-
order_id:
|
|
6759
|
+
order_id: string;
|
|
6760
|
+
ordinal_order_id: string;
|
|
6750
6761
|
market_id: number;
|
|
6751
6762
|
quantity_curr: number;
|
|
6752
6763
|
account_name: string;
|
|
@@ -6755,6 +6766,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6755
6766
|
trigger_price: number;
|
|
6756
6767
|
fill_type: number;
|
|
6757
6768
|
quantity_change: number;
|
|
6769
|
+
seq: string;
|
|
6758
6770
|
trx_id: string;
|
|
6759
6771
|
quantity_init?: number | undefined;
|
|
6760
6772
|
filled_total?: number | undefined;
|
|
@@ -6767,10 +6779,10 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6767
6779
|
data: {
|
|
6768
6780
|
status: string;
|
|
6769
6781
|
price: number;
|
|
6770
|
-
|
|
6771
|
-
block_num: number;
|
|
6782
|
+
block_num: string;
|
|
6772
6783
|
block_time: string;
|
|
6773
|
-
order_id:
|
|
6784
|
+
order_id: string;
|
|
6785
|
+
ordinal_order_id: string;
|
|
6774
6786
|
market_id: number;
|
|
6775
6787
|
quantity_curr: number;
|
|
6776
6788
|
account_name: string;
|
|
@@ -6779,6 +6791,7 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6779
6791
|
trigger_price: number;
|
|
6780
6792
|
fill_type: number;
|
|
6781
6793
|
quantity_change: number;
|
|
6794
|
+
seq: string;
|
|
6782
6795
|
trx_id: string;
|
|
6783
6796
|
quantity_init?: number | undefined;
|
|
6784
6797
|
filled_total?: number | undefined;
|
|
@@ -6789,21 +6802,30 @@ declare const getOrderHistoryResponseParser: z.ZodObject<{
|
|
|
6789
6802
|
sync: number;
|
|
6790
6803
|
}>;
|
|
6791
6804
|
declare type GetOrderHistoryResponse = z.infer<typeof getOrderHistoryResponseParser>;
|
|
6792
|
-
declare const
|
|
6793
|
-
order_id: z.ZodString
|
|
6805
|
+
declare const getOrderLifecycleParser: z.ZodEffects<z.ZodObject<{
|
|
6806
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
6807
|
+
ordinal_order_id: z.ZodOptional<z.ZodString>;
|
|
6794
6808
|
}, "strip", z.ZodTypeAny, {
|
|
6795
|
-
order_id
|
|
6809
|
+
order_id?: string | undefined;
|
|
6810
|
+
ordinal_order_id?: string | undefined;
|
|
6796
6811
|
}, {
|
|
6797
|
-
order_id
|
|
6812
|
+
order_id?: string | undefined;
|
|
6813
|
+
ordinal_order_id?: string | undefined;
|
|
6814
|
+
}>, {
|
|
6815
|
+
order_id?: string | undefined;
|
|
6816
|
+
ordinal_order_id?: string | undefined;
|
|
6817
|
+
}, {
|
|
6818
|
+
order_id?: string | undefined;
|
|
6819
|
+
ordinal_order_id?: string | undefined;
|
|
6798
6820
|
}>;
|
|
6799
|
-
declare type
|
|
6800
|
-
declare const
|
|
6821
|
+
declare type GetOrderLifecycle = z.infer<typeof getOrderLifecycleParser>;
|
|
6822
|
+
declare const getOrderLifecycleResponseParser: z.ZodObject<{
|
|
6801
6823
|
sync: z.ZodNumber;
|
|
6802
6824
|
data: z.ZodArray<z.ZodObject<{
|
|
6803
|
-
|
|
6804
|
-
block_num: z.ZodNumber;
|
|
6825
|
+
block_num: z.ZodString;
|
|
6805
6826
|
block_time: z.ZodString;
|
|
6806
|
-
order_id: z.
|
|
6827
|
+
order_id: z.ZodString;
|
|
6828
|
+
ordinal_order_id: z.ZodString;
|
|
6807
6829
|
market_id: z.ZodNumber;
|
|
6808
6830
|
quantity_init: z.ZodOptional<z.ZodNumber>;
|
|
6809
6831
|
quantity_curr: z.ZodNumber;
|
|
@@ -6815,17 +6837,18 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6815
6837
|
fill_type: z.ZodNumber;
|
|
6816
6838
|
status: z.ZodString;
|
|
6817
6839
|
quantity_change: z.ZodNumber;
|
|
6818
|
-
trx_id: z.ZodString;
|
|
6819
6840
|
filled_total: z.ZodOptional<z.ZodNumber>;
|
|
6820
6841
|
filled_amount: z.ZodOptional<z.ZodNumber>;
|
|
6821
6842
|
filled_fee: z.ZodOptional<z.ZodNumber>;
|
|
6843
|
+
seq: z.ZodString;
|
|
6844
|
+
trx_id: z.ZodString;
|
|
6822
6845
|
}, "strip", z.ZodTypeAny, {
|
|
6823
6846
|
status: string;
|
|
6824
6847
|
price: number;
|
|
6825
|
-
|
|
6826
|
-
block_num: number;
|
|
6848
|
+
block_num: string;
|
|
6827
6849
|
block_time: string;
|
|
6828
|
-
order_id:
|
|
6850
|
+
order_id: string;
|
|
6851
|
+
ordinal_order_id: string;
|
|
6829
6852
|
market_id: number;
|
|
6830
6853
|
quantity_curr: number;
|
|
6831
6854
|
account_name: string;
|
|
@@ -6834,6 +6857,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6834
6857
|
trigger_price: number;
|
|
6835
6858
|
fill_type: number;
|
|
6836
6859
|
quantity_change: number;
|
|
6860
|
+
seq: string;
|
|
6837
6861
|
trx_id: string;
|
|
6838
6862
|
quantity_init?: number | undefined;
|
|
6839
6863
|
filled_total?: number | undefined;
|
|
@@ -6842,10 +6866,10 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6842
6866
|
}, {
|
|
6843
6867
|
status: string;
|
|
6844
6868
|
price: number;
|
|
6845
|
-
|
|
6846
|
-
block_num: number;
|
|
6869
|
+
block_num: string;
|
|
6847
6870
|
block_time: string;
|
|
6848
|
-
order_id:
|
|
6871
|
+
order_id: string;
|
|
6872
|
+
ordinal_order_id: string;
|
|
6849
6873
|
market_id: number;
|
|
6850
6874
|
quantity_curr: number;
|
|
6851
6875
|
account_name: string;
|
|
@@ -6854,6 +6878,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6854
6878
|
trigger_price: number;
|
|
6855
6879
|
fill_type: number;
|
|
6856
6880
|
quantity_change: number;
|
|
6881
|
+
seq: string;
|
|
6857
6882
|
trx_id: string;
|
|
6858
6883
|
quantity_init?: number | undefined;
|
|
6859
6884
|
filled_total?: number | undefined;
|
|
@@ -6864,10 +6889,10 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6864
6889
|
data: {
|
|
6865
6890
|
status: string;
|
|
6866
6891
|
price: number;
|
|
6867
|
-
|
|
6868
|
-
block_num: number;
|
|
6892
|
+
block_num: string;
|
|
6869
6893
|
block_time: string;
|
|
6870
|
-
order_id:
|
|
6894
|
+
order_id: string;
|
|
6895
|
+
ordinal_order_id: string;
|
|
6871
6896
|
market_id: number;
|
|
6872
6897
|
quantity_curr: number;
|
|
6873
6898
|
account_name: string;
|
|
@@ -6876,6 +6901,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6876
6901
|
trigger_price: number;
|
|
6877
6902
|
fill_type: number;
|
|
6878
6903
|
quantity_change: number;
|
|
6904
|
+
seq: string;
|
|
6879
6905
|
trx_id: string;
|
|
6880
6906
|
quantity_init?: number | undefined;
|
|
6881
6907
|
filled_total?: number | undefined;
|
|
@@ -6887,10 +6913,10 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6887
6913
|
data: {
|
|
6888
6914
|
status: string;
|
|
6889
6915
|
price: number;
|
|
6890
|
-
|
|
6891
|
-
block_num: number;
|
|
6916
|
+
block_num: string;
|
|
6892
6917
|
block_time: string;
|
|
6893
|
-
order_id:
|
|
6918
|
+
order_id: string;
|
|
6919
|
+
ordinal_order_id: string;
|
|
6894
6920
|
market_id: number;
|
|
6895
6921
|
quantity_curr: number;
|
|
6896
6922
|
account_name: string;
|
|
@@ -6899,6 +6925,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6899
6925
|
trigger_price: number;
|
|
6900
6926
|
fill_type: number;
|
|
6901
6927
|
quantity_change: number;
|
|
6928
|
+
seq: string;
|
|
6902
6929
|
trx_id: string;
|
|
6903
6930
|
quantity_init?: number | undefined;
|
|
6904
6931
|
filled_total?: number | undefined;
|
|
@@ -6907,7 +6934,7 @@ declare const getOrderResponseParser: z.ZodObject<{
|
|
|
6907
6934
|
}[];
|
|
6908
6935
|
sync: number;
|
|
6909
6936
|
}>;
|
|
6910
|
-
declare type
|
|
6937
|
+
declare type GetOrderLifecycleResponse = z.infer<typeof getOrderLifecycleResponseParser>;
|
|
6911
6938
|
declare const submitOrderParser: z.ZodObject<{
|
|
6912
6939
|
serialized_tx_hex: z.ZodString;
|
|
6913
6940
|
signatures: z.ZodArray<z.ZodString, "many">;
|
|
@@ -6922,24 +6949,29 @@ declare type SubmitOrderParser = z.infer<typeof submitOrderParser>;
|
|
|
6922
6949
|
declare const submitOrderResponseParser: z.ZodObject<{
|
|
6923
6950
|
sync: z.ZodNumber;
|
|
6924
6951
|
data: z.ZodObject<{
|
|
6952
|
+
ordinal_order_ids: z.ZodArray<z.ZodString, "many">;
|
|
6925
6953
|
order_ids: z.ZodArray<z.ZodNumber, "many">;
|
|
6926
6954
|
trx_id: z.ZodString;
|
|
6927
6955
|
}, "strip", z.ZodTypeAny, {
|
|
6928
6956
|
trx_id: string;
|
|
6957
|
+
ordinal_order_ids: string[];
|
|
6929
6958
|
order_ids: number[];
|
|
6930
6959
|
}, {
|
|
6931
6960
|
trx_id: string;
|
|
6961
|
+
ordinal_order_ids: string[];
|
|
6932
6962
|
order_ids: number[];
|
|
6933
6963
|
}>;
|
|
6934
6964
|
}, "strip", z.ZodTypeAny, {
|
|
6935
6965
|
data: {
|
|
6936
6966
|
trx_id: string;
|
|
6967
|
+
ordinal_order_ids: string[];
|
|
6937
6968
|
order_ids: number[];
|
|
6938
6969
|
};
|
|
6939
6970
|
sync: number;
|
|
6940
6971
|
}, {
|
|
6941
6972
|
data: {
|
|
6942
6973
|
trx_id: string;
|
|
6974
|
+
ordinal_order_ids: string[];
|
|
6943
6975
|
order_ids: number[];
|
|
6944
6976
|
};
|
|
6945
6977
|
sync: number;
|
|
@@ -7391,18 +7423,20 @@ declare type GetMarketsResponse = z.infer<typeof getMarketsResponseParser>;
|
|
|
7391
7423
|
* Trades
|
|
7392
7424
|
*/
|
|
7393
7425
|
declare const tradeParser: z.ZodObject<{
|
|
7394
|
-
block_num: z.
|
|
7426
|
+
block_num: z.ZodString;
|
|
7395
7427
|
block_time: z.ZodString;
|
|
7396
|
-
trade_id: z.
|
|
7428
|
+
trade_id: z.ZodString;
|
|
7397
7429
|
market_id: z.ZodNumber;
|
|
7398
7430
|
price: z.ZodNumber;
|
|
7399
7431
|
bid_user: z.ZodString;
|
|
7400
|
-
bid_user_order_id: z.
|
|
7432
|
+
bid_user_order_id: z.ZodString;
|
|
7433
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7401
7434
|
bid_total: z.ZodNumber;
|
|
7402
7435
|
bid_amount: z.ZodNumber;
|
|
7403
7436
|
bid_fee: z.ZodNumber;
|
|
7404
7437
|
ask_user: z.ZodString;
|
|
7405
|
-
ask_user_order_id: z.
|
|
7438
|
+
ask_user_order_id: z.ZodString;
|
|
7439
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7406
7440
|
ask_total: z.ZodNumber;
|
|
7407
7441
|
ask_amount: z.ZodNumber;
|
|
7408
7442
|
ask_fee: z.ZodNumber;
|
|
@@ -7410,37 +7444,41 @@ declare const tradeParser: z.ZodObject<{
|
|
|
7410
7444
|
trx_id: z.ZodString;
|
|
7411
7445
|
}, "strip", z.ZodTypeAny, {
|
|
7412
7446
|
price: number;
|
|
7413
|
-
block_num:
|
|
7447
|
+
block_num: string;
|
|
7414
7448
|
block_time: string;
|
|
7415
7449
|
market_id: number;
|
|
7416
7450
|
order_side: number;
|
|
7417
7451
|
trx_id: string;
|
|
7418
|
-
trade_id:
|
|
7452
|
+
trade_id: string;
|
|
7419
7453
|
bid_user: string;
|
|
7420
|
-
bid_user_order_id:
|
|
7454
|
+
bid_user_order_id: string;
|
|
7455
|
+
bid_user_ordinal_order_id: string;
|
|
7421
7456
|
bid_total: number;
|
|
7422
7457
|
bid_amount: number;
|
|
7423
7458
|
bid_fee: number;
|
|
7424
7459
|
ask_user: string;
|
|
7425
|
-
ask_user_order_id:
|
|
7460
|
+
ask_user_order_id: string;
|
|
7461
|
+
ask_user_ordinal_order_id: string;
|
|
7426
7462
|
ask_total: number;
|
|
7427
7463
|
ask_amount: number;
|
|
7428
7464
|
ask_fee: number;
|
|
7429
7465
|
}, {
|
|
7430
7466
|
price: number;
|
|
7431
|
-
block_num:
|
|
7467
|
+
block_num: string;
|
|
7432
7468
|
block_time: string;
|
|
7433
7469
|
market_id: number;
|
|
7434
7470
|
order_side: number;
|
|
7435
7471
|
trx_id: string;
|
|
7436
|
-
trade_id:
|
|
7472
|
+
trade_id: string;
|
|
7437
7473
|
bid_user: string;
|
|
7438
|
-
bid_user_order_id:
|
|
7474
|
+
bid_user_order_id: string;
|
|
7475
|
+
bid_user_ordinal_order_id: string;
|
|
7439
7476
|
bid_total: number;
|
|
7440
7477
|
bid_amount: number;
|
|
7441
7478
|
bid_fee: number;
|
|
7442
7479
|
ask_user: string;
|
|
7443
|
-
ask_user_order_id:
|
|
7480
|
+
ask_user_order_id: string;
|
|
7481
|
+
ask_user_ordinal_order_id: string;
|
|
7444
7482
|
ask_total: number;
|
|
7445
7483
|
ask_amount: number;
|
|
7446
7484
|
ask_fee: number;
|
|
@@ -7463,18 +7501,20 @@ declare type GetTrades = z.infer<typeof getTradesParser>;
|
|
|
7463
7501
|
declare const getTradesResponseParser: z.ZodObject<{
|
|
7464
7502
|
sync: z.ZodNumber;
|
|
7465
7503
|
data: z.ZodArray<z.ZodObject<{
|
|
7466
|
-
block_num: z.
|
|
7504
|
+
block_num: z.ZodString;
|
|
7467
7505
|
block_time: z.ZodString;
|
|
7468
|
-
trade_id: z.
|
|
7506
|
+
trade_id: z.ZodString;
|
|
7469
7507
|
market_id: z.ZodNumber;
|
|
7470
7508
|
price: z.ZodNumber;
|
|
7471
7509
|
bid_user: z.ZodString;
|
|
7472
|
-
bid_user_order_id: z.
|
|
7510
|
+
bid_user_order_id: z.ZodString;
|
|
7511
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7473
7512
|
bid_total: z.ZodNumber;
|
|
7474
7513
|
bid_amount: z.ZodNumber;
|
|
7475
7514
|
bid_fee: z.ZodNumber;
|
|
7476
7515
|
ask_user: z.ZodString;
|
|
7477
|
-
ask_user_order_id: z.
|
|
7516
|
+
ask_user_order_id: z.ZodString;
|
|
7517
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7478
7518
|
ask_total: z.ZodNumber;
|
|
7479
7519
|
ask_amount: z.ZodNumber;
|
|
7480
7520
|
ask_fee: z.ZodNumber;
|
|
@@ -7482,37 +7522,41 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7482
7522
|
trx_id: z.ZodString;
|
|
7483
7523
|
}, "strip", z.ZodTypeAny, {
|
|
7484
7524
|
price: number;
|
|
7485
|
-
block_num:
|
|
7525
|
+
block_num: string;
|
|
7486
7526
|
block_time: string;
|
|
7487
7527
|
market_id: number;
|
|
7488
7528
|
order_side: number;
|
|
7489
7529
|
trx_id: string;
|
|
7490
|
-
trade_id:
|
|
7530
|
+
trade_id: string;
|
|
7491
7531
|
bid_user: string;
|
|
7492
|
-
bid_user_order_id:
|
|
7532
|
+
bid_user_order_id: string;
|
|
7533
|
+
bid_user_ordinal_order_id: string;
|
|
7493
7534
|
bid_total: number;
|
|
7494
7535
|
bid_amount: number;
|
|
7495
7536
|
bid_fee: number;
|
|
7496
7537
|
ask_user: string;
|
|
7497
|
-
ask_user_order_id:
|
|
7538
|
+
ask_user_order_id: string;
|
|
7539
|
+
ask_user_ordinal_order_id: string;
|
|
7498
7540
|
ask_total: number;
|
|
7499
7541
|
ask_amount: number;
|
|
7500
7542
|
ask_fee: number;
|
|
7501
7543
|
}, {
|
|
7502
7544
|
price: number;
|
|
7503
|
-
block_num:
|
|
7545
|
+
block_num: string;
|
|
7504
7546
|
block_time: string;
|
|
7505
7547
|
market_id: number;
|
|
7506
7548
|
order_side: number;
|
|
7507
7549
|
trx_id: string;
|
|
7508
|
-
trade_id:
|
|
7550
|
+
trade_id: string;
|
|
7509
7551
|
bid_user: string;
|
|
7510
|
-
bid_user_order_id:
|
|
7552
|
+
bid_user_order_id: string;
|
|
7553
|
+
bid_user_ordinal_order_id: string;
|
|
7511
7554
|
bid_total: number;
|
|
7512
7555
|
bid_amount: number;
|
|
7513
7556
|
bid_fee: number;
|
|
7514
7557
|
ask_user: string;
|
|
7515
|
-
ask_user_order_id:
|
|
7558
|
+
ask_user_order_id: string;
|
|
7559
|
+
ask_user_ordinal_order_id: string;
|
|
7516
7560
|
ask_total: number;
|
|
7517
7561
|
ask_amount: number;
|
|
7518
7562
|
ask_fee: number;
|
|
@@ -7520,19 +7564,21 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7520
7564
|
}, "strip", z.ZodTypeAny, {
|
|
7521
7565
|
data: {
|
|
7522
7566
|
price: number;
|
|
7523
|
-
block_num:
|
|
7567
|
+
block_num: string;
|
|
7524
7568
|
block_time: string;
|
|
7525
7569
|
market_id: number;
|
|
7526
7570
|
order_side: number;
|
|
7527
7571
|
trx_id: string;
|
|
7528
|
-
trade_id:
|
|
7572
|
+
trade_id: string;
|
|
7529
7573
|
bid_user: string;
|
|
7530
|
-
bid_user_order_id:
|
|
7574
|
+
bid_user_order_id: string;
|
|
7575
|
+
bid_user_ordinal_order_id: string;
|
|
7531
7576
|
bid_total: number;
|
|
7532
7577
|
bid_amount: number;
|
|
7533
7578
|
bid_fee: number;
|
|
7534
7579
|
ask_user: string;
|
|
7535
|
-
ask_user_order_id:
|
|
7580
|
+
ask_user_order_id: string;
|
|
7581
|
+
ask_user_ordinal_order_id: string;
|
|
7536
7582
|
ask_total: number;
|
|
7537
7583
|
ask_amount: number;
|
|
7538
7584
|
ask_fee: number;
|
|
@@ -7541,19 +7587,21 @@ declare const getTradesResponseParser: z.ZodObject<{
|
|
|
7541
7587
|
}, {
|
|
7542
7588
|
data: {
|
|
7543
7589
|
price: number;
|
|
7544
|
-
block_num:
|
|
7590
|
+
block_num: string;
|
|
7545
7591
|
block_time: string;
|
|
7546
7592
|
market_id: number;
|
|
7547
7593
|
order_side: number;
|
|
7548
7594
|
trx_id: string;
|
|
7549
|
-
trade_id:
|
|
7595
|
+
trade_id: string;
|
|
7550
7596
|
bid_user: string;
|
|
7551
|
-
bid_user_order_id:
|
|
7597
|
+
bid_user_order_id: string;
|
|
7598
|
+
bid_user_ordinal_order_id: string;
|
|
7552
7599
|
bid_total: number;
|
|
7553
7600
|
bid_amount: number;
|
|
7554
7601
|
bid_fee: number;
|
|
7555
7602
|
ask_user: string;
|
|
7556
|
-
ask_user_order_id:
|
|
7603
|
+
ask_user_order_id: string;
|
|
7604
|
+
ask_user_ordinal_order_id: string;
|
|
7557
7605
|
ask_total: number;
|
|
7558
7606
|
ask_amount: number;
|
|
7559
7607
|
ask_fee: number;
|
|
@@ -7582,18 +7630,20 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7582
7630
|
sync: z.ZodNumber;
|
|
7583
7631
|
count: z.ZodNumber;
|
|
7584
7632
|
data: z.ZodArray<z.ZodObject<{
|
|
7585
|
-
block_num: z.
|
|
7633
|
+
block_num: z.ZodString;
|
|
7586
7634
|
block_time: z.ZodString;
|
|
7587
|
-
trade_id: z.
|
|
7635
|
+
trade_id: z.ZodString;
|
|
7588
7636
|
market_id: z.ZodNumber;
|
|
7589
7637
|
price: z.ZodNumber;
|
|
7590
7638
|
bid_user: z.ZodString;
|
|
7591
|
-
bid_user_order_id: z.
|
|
7639
|
+
bid_user_order_id: z.ZodString;
|
|
7640
|
+
bid_user_ordinal_order_id: z.ZodString;
|
|
7592
7641
|
bid_total: z.ZodNumber;
|
|
7593
7642
|
bid_amount: z.ZodNumber;
|
|
7594
7643
|
bid_fee: z.ZodNumber;
|
|
7595
7644
|
ask_user: z.ZodString;
|
|
7596
|
-
ask_user_order_id: z.
|
|
7645
|
+
ask_user_order_id: z.ZodString;
|
|
7646
|
+
ask_user_ordinal_order_id: z.ZodString;
|
|
7597
7647
|
ask_total: z.ZodNumber;
|
|
7598
7648
|
ask_amount: z.ZodNumber;
|
|
7599
7649
|
ask_fee: z.ZodNumber;
|
|
@@ -7601,37 +7651,41 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7601
7651
|
trx_id: z.ZodString;
|
|
7602
7652
|
}, "strip", z.ZodTypeAny, {
|
|
7603
7653
|
price: number;
|
|
7604
|
-
block_num:
|
|
7654
|
+
block_num: string;
|
|
7605
7655
|
block_time: string;
|
|
7606
7656
|
market_id: number;
|
|
7607
7657
|
order_side: number;
|
|
7608
7658
|
trx_id: string;
|
|
7609
|
-
trade_id:
|
|
7659
|
+
trade_id: string;
|
|
7610
7660
|
bid_user: string;
|
|
7611
|
-
bid_user_order_id:
|
|
7661
|
+
bid_user_order_id: string;
|
|
7662
|
+
bid_user_ordinal_order_id: string;
|
|
7612
7663
|
bid_total: number;
|
|
7613
7664
|
bid_amount: number;
|
|
7614
7665
|
bid_fee: number;
|
|
7615
7666
|
ask_user: string;
|
|
7616
|
-
ask_user_order_id:
|
|
7667
|
+
ask_user_order_id: string;
|
|
7668
|
+
ask_user_ordinal_order_id: string;
|
|
7617
7669
|
ask_total: number;
|
|
7618
7670
|
ask_amount: number;
|
|
7619
7671
|
ask_fee: number;
|
|
7620
7672
|
}, {
|
|
7621
7673
|
price: number;
|
|
7622
|
-
block_num:
|
|
7674
|
+
block_num: string;
|
|
7623
7675
|
block_time: string;
|
|
7624
7676
|
market_id: number;
|
|
7625
7677
|
order_side: number;
|
|
7626
7678
|
trx_id: string;
|
|
7627
|
-
trade_id:
|
|
7679
|
+
trade_id: string;
|
|
7628
7680
|
bid_user: string;
|
|
7629
|
-
bid_user_order_id:
|
|
7681
|
+
bid_user_order_id: string;
|
|
7682
|
+
bid_user_ordinal_order_id: string;
|
|
7630
7683
|
bid_total: number;
|
|
7631
7684
|
bid_amount: number;
|
|
7632
7685
|
bid_fee: number;
|
|
7633
7686
|
ask_user: string;
|
|
7634
|
-
ask_user_order_id:
|
|
7687
|
+
ask_user_order_id: string;
|
|
7688
|
+
ask_user_ordinal_order_id: string;
|
|
7635
7689
|
ask_total: number;
|
|
7636
7690
|
ask_amount: number;
|
|
7637
7691
|
ask_fee: number;
|
|
@@ -7639,19 +7693,21 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7639
7693
|
}, "strip", z.ZodTypeAny, {
|
|
7640
7694
|
data: {
|
|
7641
7695
|
price: number;
|
|
7642
|
-
block_num:
|
|
7696
|
+
block_num: string;
|
|
7643
7697
|
block_time: string;
|
|
7644
7698
|
market_id: number;
|
|
7645
7699
|
order_side: number;
|
|
7646
7700
|
trx_id: string;
|
|
7647
|
-
trade_id:
|
|
7701
|
+
trade_id: string;
|
|
7648
7702
|
bid_user: string;
|
|
7649
|
-
bid_user_order_id:
|
|
7703
|
+
bid_user_order_id: string;
|
|
7704
|
+
bid_user_ordinal_order_id: string;
|
|
7650
7705
|
bid_total: number;
|
|
7651
7706
|
bid_amount: number;
|
|
7652
7707
|
bid_fee: number;
|
|
7653
7708
|
ask_user: string;
|
|
7654
|
-
ask_user_order_id:
|
|
7709
|
+
ask_user_order_id: string;
|
|
7710
|
+
ask_user_ordinal_order_id: string;
|
|
7655
7711
|
ask_total: number;
|
|
7656
7712
|
ask_amount: number;
|
|
7657
7713
|
ask_fee: number;
|
|
@@ -7661,19 +7717,21 @@ declare const getTradeHistoryResponseParser: z.ZodObject<{
|
|
|
7661
7717
|
}, {
|
|
7662
7718
|
data: {
|
|
7663
7719
|
price: number;
|
|
7664
|
-
block_num:
|
|
7720
|
+
block_num: string;
|
|
7665
7721
|
block_time: string;
|
|
7666
7722
|
market_id: number;
|
|
7667
7723
|
order_side: number;
|
|
7668
7724
|
trx_id: string;
|
|
7669
|
-
trade_id:
|
|
7725
|
+
trade_id: string;
|
|
7670
7726
|
bid_user: string;
|
|
7671
|
-
bid_user_order_id:
|
|
7727
|
+
bid_user_order_id: string;
|
|
7728
|
+
bid_user_ordinal_order_id: string;
|
|
7672
7729
|
bid_total: number;
|
|
7673
7730
|
bid_amount: number;
|
|
7674
7731
|
bid_fee: number;
|
|
7675
7732
|
ask_user: string;
|
|
7676
|
-
ask_user_order_id:
|
|
7733
|
+
ask_user_order_id: string;
|
|
7734
|
+
ask_user_ordinal_order_id: string;
|
|
7677
7735
|
ask_total: number;
|
|
7678
7736
|
ask_amount: number;
|
|
7679
7737
|
ask_fee: number;
|
|
@@ -7922,19 +7980,6 @@ declare enum logStatus {
|
|
|
7922
7980
|
CANCEL = "cancel",
|
|
7923
7981
|
DELETE = "delete"
|
|
7924
7982
|
}
|
|
7925
|
-
interface CurrentOrder {
|
|
7926
|
-
order_id: number;
|
|
7927
|
-
market_id: number;
|
|
7928
|
-
quantity_init: number;
|
|
7929
|
-
quantity_curr: number;
|
|
7930
|
-
price: number;
|
|
7931
|
-
account_name: string;
|
|
7932
|
-
order_side: number;
|
|
7933
|
-
order_type: number;
|
|
7934
|
-
status: string;
|
|
7935
|
-
created_at: string;
|
|
7936
|
-
updated_at: string;
|
|
7937
|
-
}
|
|
7938
7983
|
interface DbMarket {
|
|
7939
7984
|
market_id: number;
|
|
7940
7985
|
order_min: number;
|
|
@@ -8968,4 +9013,4 @@ declare const isInputInvalid: (data: string, value: string | number, pool: {
|
|
|
8968
9013
|
}) => boolean;
|
|
8969
9014
|
declare const applyDiscountToFee: (fee: number, staked: number) => number;
|
|
8970
9015
|
|
|
8971
|
-
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats,
|
|
9016
|
+
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats, Daily, DbMarket, DepositBody, Depth, ExchangeRate, ExchangeRates, ExtendedAsset, ExtendedAssetParser, ExtendedToken, ExtendedTokenWithRate, FEE_FACTOR, GenerateAddressBody, GenerateAddressResponse, GenerateAuth, GenerateAuthBaseAction, GetDailyResponseParser, GetDepth, GetDepthResponse, GetLeaderboard, GetLeaderboardResponseParser, GetMarketsResponse, GetOHLCV, GetOHLCVResponse, GetOpenOrders, GetOpenOrdersResponse, GetOrderHistory, GetOrderHistoryResponse, GetOrderLifecycle, GetOrderLifecycleResponse, GetReferralTotals, GetReferralTotalsResponseParser, GetReferrals, GetReferralsResponseParser, GetSyncResponse, GetTradeHistory, GetTradeHistoryResponse, GetTrades, GetTradesResponseParser, Graph, ILink, INode, ITopics, Leaderboard, LoginAccountParamsV3, Market, Networks, OHLCV, OrderHistory, OtcOrderResponse, OtcQuoteBody, OtcQuoteResponse, Pool, PoolTable, Providers, Rate, RawPool, Referral, ReferralTotal, Status, SubmitOrderParser, SubmitOrderResponse, Sync, TOPICS, Trade, Transaction, Type, WRAP_AUTH_ACTION, WRAP_CONTRACT, Wallet, WithdrawBody, WithdrawBodyBaseAction, WithdrawHistoryMetalResponse, WithdrawHistoryMetalSwap, WithdrawMetalResponse, WithdrawalFeeQuote, Wrap, WrapSetConf, WrapStart, accountParser, addressParser, applyDiscountToFee, authorizationParser, authorizationsParser, baseActionParser, baseActionSerializedParser, bloksRatesParser, compute_liquidity, compute_transfer, compute_transfer_curve, createAbstractAuthParser, dailyParser, depositBodyParser, depthParser, exchangeRateParser, exchangeRatesParser, explorerLinkByChain, fillType, generateAddressBodyParser, generateAddressResponse, generateAuthParser, getDailyResponseParser, getDepthParser, getDepthResponseParser, getLeaderboardParser, getLeaderboardResponseParser, getMarketsResponseParser, getOhlcvParser, getOhlcvResponseParser, getOpenOrdersParser, getOpenOrdersResponseParser, getOrderHistoryParser, getOrderHistoryResponseParser, getOrderLifecycleParser, getOrderLifecycleResponseParser, getReferralTotalsParser, getReferralTotalsResponseParser, getReferralsParser, getReferralsResponseParser, getSyncResponseParser, getTradeHistoryParser, getTradeHistoryResponseParser, getTradesParser, getTradesResponseParser, initializeCoins, initializeConstants, isInputInvalid, isSameToken, leaderboardParser, logStatus, loginAccountParamsV3Parser, marketParser, median, ohlcvParser, orderHistoryParser, orderSide, orderType, otcOrderResponseParser, otcQuoteBodyParser, otcQuoteResponseParser, protonExplorerTxUrl, rateParser, refferalParser, refferalTotalParser, similarChains, singleActionTransactionParser, submitOrderParser, submitOrderResponseParser, syncParser, tradeParser, transactionParser, webauthActionParser, withdrawBodyParser, withdrawHistoryMetalResponseParser, withdrawHistoryMetalSwapParser, withdrawMetalResponseParser, withdrawalFeeQuoteParser, wrapParser, wrapSetConfParser, wrapStartParser };
|
package/dist/index.js
CHANGED
|
@@ -78,8 +78,8 @@ __export(src_exports, {
|
|
|
78
78
|
getOpenOrdersResponseParser: () => getOpenOrdersResponseParser,
|
|
79
79
|
getOrderHistoryParser: () => getOrderHistoryParser,
|
|
80
80
|
getOrderHistoryResponseParser: () => getOrderHistoryResponseParser,
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
getOrderLifecycleParser: () => getOrderLifecycleParser,
|
|
82
|
+
getOrderLifecycleResponseParser: () => getOrderLifecycleResponseParser,
|
|
83
83
|
getReferralTotalsParser: () => getReferralTotalsParser,
|
|
84
84
|
getReferralTotalsResponseParser: () => getReferralTotalsResponseParser,
|
|
85
85
|
getReferralsParser: () => getReferralsParser,
|
|
@@ -1851,10 +1851,10 @@ var getOhlcvResponseParser = z11.object({
|
|
|
1851
1851
|
data: z11.array(ohlcvParser)
|
|
1852
1852
|
});
|
|
1853
1853
|
var orderHistoryParser = z11.object({
|
|
1854
|
-
|
|
1855
|
-
block_num: z11.number(),
|
|
1854
|
+
block_num: z11.string(),
|
|
1856
1855
|
block_time: z11.string(),
|
|
1857
|
-
order_id: z11.
|
|
1856
|
+
order_id: z11.string(),
|
|
1857
|
+
ordinal_order_id: z11.string(),
|
|
1858
1858
|
market_id: z11.number(),
|
|
1859
1859
|
quantity_init: z11.number().optional(),
|
|
1860
1860
|
quantity_curr: z11.number(),
|
|
@@ -1866,10 +1866,11 @@ var orderHistoryParser = z11.object({
|
|
|
1866
1866
|
fill_type: z11.number(),
|
|
1867
1867
|
status: z11.string(),
|
|
1868
1868
|
quantity_change: z11.number(),
|
|
1869
|
-
trx_id: z11.string(),
|
|
1870
1869
|
filled_total: z11.number().optional(),
|
|
1871
1870
|
filled_amount: z11.number().optional(),
|
|
1872
|
-
filled_fee: z11.number().optional()
|
|
1871
|
+
filled_fee: z11.number().optional(),
|
|
1872
|
+
seq: z11.string(),
|
|
1873
|
+
trx_id: z11.string()
|
|
1873
1874
|
});
|
|
1874
1875
|
var getOpenOrdersParser = z11.object({
|
|
1875
1876
|
account: z11.string(),
|
|
@@ -1895,10 +1896,19 @@ var getOrderHistoryResponseParser = z11.object({
|
|
|
1895
1896
|
count: z11.number(),
|
|
1896
1897
|
data: z11.array(orderHistoryParser)
|
|
1897
1898
|
});
|
|
1898
|
-
var
|
|
1899
|
-
order_id: z11.string()
|
|
1899
|
+
var getOrderLifecycleParser = z11.object({
|
|
1900
|
+
order_id: z11.string(),
|
|
1901
|
+
ordinal_order_id: z11.string()
|
|
1902
|
+
}).partial().superRefine((data, ctx) => {
|
|
1903
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
1904
|
+
ctx.addIssue({
|
|
1905
|
+
code: z11.ZodIssueCode.custom,
|
|
1906
|
+
path: ["ordinal_order_id"],
|
|
1907
|
+
message: "One of Order ID or Ordinal Order ID is required"
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1900
1910
|
});
|
|
1901
|
-
var
|
|
1911
|
+
var getOrderLifecycleResponseParser = z11.object({
|
|
1902
1912
|
sync: z11.number(),
|
|
1903
1913
|
data: z11.array(orderHistoryParser)
|
|
1904
1914
|
});
|
|
@@ -1909,6 +1919,7 @@ var submitOrderParser = z11.object({
|
|
|
1909
1919
|
var submitOrderResponseParser = z11.object({
|
|
1910
1920
|
sync: z11.number(),
|
|
1911
1921
|
data: z11.object({
|
|
1922
|
+
ordinal_order_ids: z11.array(z11.string()),
|
|
1912
1923
|
order_ids: z11.array(z11.number()),
|
|
1913
1924
|
trx_id: z11.string()
|
|
1914
1925
|
})
|
|
@@ -1972,18 +1983,20 @@ var getMarketsResponseParser = z11.object({
|
|
|
1972
1983
|
data: z11.array(marketParser)
|
|
1973
1984
|
});
|
|
1974
1985
|
var tradeParser = z11.object({
|
|
1975
|
-
block_num: z11.
|
|
1986
|
+
block_num: z11.string(),
|
|
1976
1987
|
block_time: z11.string(),
|
|
1977
|
-
trade_id: z11.
|
|
1988
|
+
trade_id: z11.string(),
|
|
1978
1989
|
market_id: z11.number(),
|
|
1979
1990
|
price: z11.number(),
|
|
1980
1991
|
bid_user: z11.string(),
|
|
1981
|
-
bid_user_order_id: z11.
|
|
1992
|
+
bid_user_order_id: z11.string(),
|
|
1993
|
+
bid_user_ordinal_order_id: z11.string(),
|
|
1982
1994
|
bid_total: z11.number(),
|
|
1983
1995
|
bid_amount: z11.number(),
|
|
1984
1996
|
bid_fee: z11.number(),
|
|
1985
1997
|
ask_user: z11.string(),
|
|
1986
|
-
ask_user_order_id: z11.
|
|
1998
|
+
ask_user_order_id: z11.string(),
|
|
1999
|
+
ask_user_ordinal_order_id: z11.string(),
|
|
1987
2000
|
ask_total: z11.number(),
|
|
1988
2001
|
ask_amount: z11.number(),
|
|
1989
2002
|
ask_fee: z11.number(),
|
|
@@ -3811,8 +3824,8 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
3811
3824
|
getOpenOrdersResponseParser,
|
|
3812
3825
|
getOrderHistoryParser,
|
|
3813
3826
|
getOrderHistoryResponseParser,
|
|
3814
|
-
|
|
3815
|
-
|
|
3827
|
+
getOrderLifecycleParser,
|
|
3828
|
+
getOrderLifecycleResponseParser,
|
|
3816
3829
|
getReferralTotalsParser,
|
|
3817
3830
|
getReferralTotalsResponseParser,
|
|
3818
3831
|
getReferralsParser,
|
package/dist/index.mjs
CHANGED
|
@@ -1721,10 +1721,10 @@ var getOhlcvResponseParser = z11.object({
|
|
|
1721
1721
|
data: z11.array(ohlcvParser)
|
|
1722
1722
|
});
|
|
1723
1723
|
var orderHistoryParser = z11.object({
|
|
1724
|
-
|
|
1725
|
-
block_num: z11.number(),
|
|
1724
|
+
block_num: z11.string(),
|
|
1726
1725
|
block_time: z11.string(),
|
|
1727
|
-
order_id: z11.
|
|
1726
|
+
order_id: z11.string(),
|
|
1727
|
+
ordinal_order_id: z11.string(),
|
|
1728
1728
|
market_id: z11.number(),
|
|
1729
1729
|
quantity_init: z11.number().optional(),
|
|
1730
1730
|
quantity_curr: z11.number(),
|
|
@@ -1736,10 +1736,11 @@ var orderHistoryParser = z11.object({
|
|
|
1736
1736
|
fill_type: z11.number(),
|
|
1737
1737
|
status: z11.string(),
|
|
1738
1738
|
quantity_change: z11.number(),
|
|
1739
|
-
trx_id: z11.string(),
|
|
1740
1739
|
filled_total: z11.number().optional(),
|
|
1741
1740
|
filled_amount: z11.number().optional(),
|
|
1742
|
-
filled_fee: z11.number().optional()
|
|
1741
|
+
filled_fee: z11.number().optional(),
|
|
1742
|
+
seq: z11.string(),
|
|
1743
|
+
trx_id: z11.string()
|
|
1743
1744
|
});
|
|
1744
1745
|
var getOpenOrdersParser = z11.object({
|
|
1745
1746
|
account: z11.string(),
|
|
@@ -1765,10 +1766,19 @@ var getOrderHistoryResponseParser = z11.object({
|
|
|
1765
1766
|
count: z11.number(),
|
|
1766
1767
|
data: z11.array(orderHistoryParser)
|
|
1767
1768
|
});
|
|
1768
|
-
var
|
|
1769
|
-
order_id: z11.string()
|
|
1769
|
+
var getOrderLifecycleParser = z11.object({
|
|
1770
|
+
order_id: z11.string(),
|
|
1771
|
+
ordinal_order_id: z11.string()
|
|
1772
|
+
}).partial().superRefine((data, ctx) => {
|
|
1773
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
1774
|
+
ctx.addIssue({
|
|
1775
|
+
code: z11.ZodIssueCode.custom,
|
|
1776
|
+
path: ["ordinal_order_id"],
|
|
1777
|
+
message: "One of Order ID or Ordinal Order ID is required"
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1770
1780
|
});
|
|
1771
|
-
var
|
|
1781
|
+
var getOrderLifecycleResponseParser = z11.object({
|
|
1772
1782
|
sync: z11.number(),
|
|
1773
1783
|
data: z11.array(orderHistoryParser)
|
|
1774
1784
|
});
|
|
@@ -1779,6 +1789,7 @@ var submitOrderParser = z11.object({
|
|
|
1779
1789
|
var submitOrderResponseParser = z11.object({
|
|
1780
1790
|
sync: z11.number(),
|
|
1781
1791
|
data: z11.object({
|
|
1792
|
+
ordinal_order_ids: z11.array(z11.string()),
|
|
1782
1793
|
order_ids: z11.array(z11.number()),
|
|
1783
1794
|
trx_id: z11.string()
|
|
1784
1795
|
})
|
|
@@ -1842,18 +1853,20 @@ var getMarketsResponseParser = z11.object({
|
|
|
1842
1853
|
data: z11.array(marketParser)
|
|
1843
1854
|
});
|
|
1844
1855
|
var tradeParser = z11.object({
|
|
1845
|
-
block_num: z11.
|
|
1856
|
+
block_num: z11.string(),
|
|
1846
1857
|
block_time: z11.string(),
|
|
1847
|
-
trade_id: z11.
|
|
1858
|
+
trade_id: z11.string(),
|
|
1848
1859
|
market_id: z11.number(),
|
|
1849
1860
|
price: z11.number(),
|
|
1850
1861
|
bid_user: z11.string(),
|
|
1851
|
-
bid_user_order_id: z11.
|
|
1862
|
+
bid_user_order_id: z11.string(),
|
|
1863
|
+
bid_user_ordinal_order_id: z11.string(),
|
|
1852
1864
|
bid_total: z11.number(),
|
|
1853
1865
|
bid_amount: z11.number(),
|
|
1854
1866
|
bid_fee: z11.number(),
|
|
1855
1867
|
ask_user: z11.string(),
|
|
1856
|
-
ask_user_order_id: z11.
|
|
1868
|
+
ask_user_order_id: z11.string(),
|
|
1869
|
+
ask_user_ordinal_order_id: z11.string(),
|
|
1857
1870
|
ask_total: z11.number(),
|
|
1858
1871
|
ask_amount: z11.number(),
|
|
1859
1872
|
ask_fee: z11.number(),
|
|
@@ -3680,8 +3693,8 @@ export {
|
|
|
3680
3693
|
getOpenOrdersResponseParser,
|
|
3681
3694
|
getOrderHistoryParser,
|
|
3682
3695
|
getOrderHistoryResponseParser,
|
|
3683
|
-
|
|
3684
|
-
|
|
3696
|
+
getOrderLifecycleParser,
|
|
3697
|
+
getOrderLifecycleResponseParser,
|
|
3685
3698
|
getReferralTotalsParser,
|
|
3686
3699
|
getReferralTotalsResponseParser,
|
|
3687
3700
|
getReferralsParser,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.83",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"resolutions": {
|
|
41
41
|
"typescript": "4.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "ceecdbf112269882eb995b1e6f14c2c8e46a9e2c"
|
|
44
44
|
}
|
package/src/parsers/dex.ts
CHANGED
|
@@ -37,10 +37,10 @@ export type GetOHLCVResponse = z.infer<typeof getOhlcvResponseParser>;
|
|
|
37
37
|
* Order History
|
|
38
38
|
*/
|
|
39
39
|
export const orderHistoryParser = z.object({
|
|
40
|
-
|
|
41
|
-
block_num: z.number(),
|
|
40
|
+
block_num: z.string(),
|
|
42
41
|
block_time: z.string(),
|
|
43
|
-
order_id: z.
|
|
42
|
+
order_id: z.string(),
|
|
43
|
+
ordinal_order_id: z.string(),
|
|
44
44
|
market_id: z.number(),
|
|
45
45
|
quantity_init: z.number().optional(),
|
|
46
46
|
quantity_curr: z.number(),
|
|
@@ -52,10 +52,11 @@ export const orderHistoryParser = z.object({
|
|
|
52
52
|
fill_type: z.number(),
|
|
53
53
|
status: z.string(),
|
|
54
54
|
quantity_change: z.number(),
|
|
55
|
-
trx_id: z.string(),
|
|
56
55
|
filled_total: z.number().optional(),
|
|
57
56
|
filled_amount: z.number().optional(),
|
|
58
57
|
filled_fee: z.number().optional(),
|
|
58
|
+
seq: z.string(),
|
|
59
|
+
trx_id: z.string(),
|
|
59
60
|
});
|
|
60
61
|
export type OrderHistory = z.infer<typeof orderHistoryParser>;
|
|
61
62
|
|
|
@@ -99,16 +100,30 @@ export type GetOrderHistoryResponse = z.infer<
|
|
|
99
100
|
typeof getOrderHistoryResponseParser
|
|
100
101
|
>;
|
|
101
102
|
|
|
102
|
-
export const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
export const getOrderLifecycleParser = z
|
|
104
|
+
.object({
|
|
105
|
+
order_id: z.string(),
|
|
106
|
+
ordinal_order_id: z.string(),
|
|
107
|
+
})
|
|
108
|
+
.partial()
|
|
109
|
+
.superRefine((data, ctx) => {
|
|
110
|
+
if (!data.order_id && !data.ordinal_order_id) {
|
|
111
|
+
ctx.addIssue({
|
|
112
|
+
code: z.ZodIssueCode.custom,
|
|
113
|
+
path: ["ordinal_order_id"],
|
|
114
|
+
message: "One of Order ID or Ordinal Order ID is required",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
export type GetOrderLifecycle = z.infer<typeof getOrderLifecycleParser>;
|
|
119
|
+
|
|
120
|
+
export const getOrderLifecycleResponseParser = z.object({
|
|
108
121
|
sync: z.number(),
|
|
109
122
|
data: z.array(orderHistoryParser),
|
|
110
123
|
});
|
|
111
|
-
export type
|
|
124
|
+
export type GetOrderLifecycleResponse = z.infer<
|
|
125
|
+
typeof getOrderLifecycleResponseParser
|
|
126
|
+
>;
|
|
112
127
|
|
|
113
128
|
export const submitOrderParser = z.object({
|
|
114
129
|
serialized_tx_hex: z.string(),
|
|
@@ -119,6 +134,7 @@ export type SubmitOrderParser = z.infer<typeof submitOrderParser>;
|
|
|
119
134
|
export const submitOrderResponseParser = z.object({
|
|
120
135
|
sync: z.number(),
|
|
121
136
|
data: z.object({
|
|
137
|
+
ordinal_order_ids: z.array(z.string()),
|
|
122
138
|
order_ids: z.array(z.number()),
|
|
123
139
|
trx_id: z.string(),
|
|
124
140
|
}),
|
|
@@ -213,18 +229,20 @@ export type GetMarketsResponse = z.infer<typeof getMarketsResponseParser>;
|
|
|
213
229
|
* Trades
|
|
214
230
|
*/
|
|
215
231
|
export const tradeParser = z.object({
|
|
216
|
-
block_num: z.
|
|
232
|
+
block_num: z.string(),
|
|
217
233
|
block_time: z.string(),
|
|
218
|
-
trade_id: z.
|
|
234
|
+
trade_id: z.string(),
|
|
219
235
|
market_id: z.number(),
|
|
220
236
|
price: z.number(),
|
|
221
237
|
bid_user: z.string(),
|
|
222
|
-
bid_user_order_id: z.
|
|
238
|
+
bid_user_order_id: z.string(),
|
|
239
|
+
bid_user_ordinal_order_id: z.string(),
|
|
223
240
|
bid_total: z.number(),
|
|
224
241
|
bid_amount: z.number(),
|
|
225
242
|
bid_fee: z.number(),
|
|
226
243
|
ask_user: z.string(),
|
|
227
|
-
ask_user_order_id: z.
|
|
244
|
+
ask_user_order_id: z.string(),
|
|
245
|
+
ask_user_ordinal_order_id: z.string(),
|
|
228
246
|
ask_total: z.number(),
|
|
229
247
|
ask_amount: z.number(),
|
|
230
248
|
ask_fee: z.number(),
|
|
@@ -391,20 +409,6 @@ export enum logStatus {
|
|
|
391
409
|
DELETE = "delete",
|
|
392
410
|
}
|
|
393
411
|
|
|
394
|
-
export interface CurrentOrder {
|
|
395
|
-
order_id: number;
|
|
396
|
-
market_id: number;
|
|
397
|
-
quantity_init: number;
|
|
398
|
-
quantity_curr: number;
|
|
399
|
-
price: number;
|
|
400
|
-
account_name: string;
|
|
401
|
-
order_side: number;
|
|
402
|
-
order_type: number;
|
|
403
|
-
status: string;
|
|
404
|
-
created_at: string;
|
|
405
|
-
updated_at: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
412
|
export interface DbMarket {
|
|
409
413
|
market_id: number;
|
|
410
414
|
order_min: number;
|