@pear-protocol/types 2.22.1 → 2.24.0
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/bundle.d.ts +1 -0
- package/dist/common/transaction-hash.d.ts +7 -0
- package/dist/copy/entities.d.ts +160 -10
- package/dist/copy/responses.d.ts +95 -11
- package/dist/execution/entities.d.ts +43 -43
- package/dist/execution/queries.d.ts +3 -2
- package/dist/execution/responses.d.ts +24 -24
- package/dist/fill/entities.d.ts +60 -1
- package/dist/fill/queries.d.ts +1 -0
- package/dist/fill/responses.d.ts +34 -4
- package/dist/index.js +668 -410
- package/dist/ladder/entities.d.ts +141 -24
- package/dist/ladder/payloads.d.ts +60 -24
- package/dist/ladder/queries.d.ts +2 -2
- package/dist/ladder/responses.d.ts +420 -69
- package/dist/notification/entities.d.ts +53 -6
- package/dist/notification/responses.d.ts +24 -2
- package/dist/order/entities.d.ts +3 -3
- package/dist/position/entities.d.ts +5 -5
- package/dist/position/responses.d.ts +4 -4
- package/dist/realtime/frames.d.ts +38 -6
- package/dist/realtime/public-events.d.ts +19 -3
- package/dist/rewards/entities.d.ts +18 -0
- package/dist/rewards/index.d.ts +1 -0
- package/dist/rewards/queries.d.ts +7 -0
- package/dist/rewards/responses.d.ts +54 -0
- package/dist/schedule/entities.d.ts +155 -19
- package/dist/schedule/index.d.ts +1 -0
- package/dist/schedule/queries.d.ts +3 -2
- package/dist/schedule/responses.d.ts +142 -19
- package/dist/sync/payloads.d.ts +56 -88
- package/dist/tca/responses.d.ts +12 -12
- package/dist/trade/payloads.d.ts +60 -24
- package/dist/trade/responses.d.ts +60 -60
- package/dist/traders/performance.d.ts +4 -0
- package/dist/traders/public.d.ts +537 -285
- package/dist/trigger/common/index.d.ts +8 -2
- package/dist/trigger/entities/conditions.d.ts +40 -0
- package/dist/trigger/entities/index.d.ts +339 -32
- package/dist/trigger/payloads/conditions.d.ts +70 -38
- package/dist/trigger/payloads/index.d.ts +408 -216
- package/dist/trigger/queries.d.ts +2 -2
- package/dist/trigger/responses.d.ts +218 -20
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './baskets/recommended';
|
|
|
3
3
|
export * from './baskets/saved';
|
|
4
4
|
export * from './common/address';
|
|
5
5
|
export * from './common/trade-legs';
|
|
6
|
+
export * from './common/transaction-hash';
|
|
6
7
|
export * from './connector';
|
|
7
8
|
export * from './copy';
|
|
8
9
|
export * from './execution';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A validated 32-byte Ethereum transaction hash. Hex case carries no meaning, so the value passes through as
|
|
4
|
+
* written; the zod schema below is the only mint point.
|
|
5
|
+
*/
|
|
6
|
+
export type EthereumTransactionHash = `0x${string}`;
|
|
7
|
+
export declare const EthereumTransactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
package/dist/copy/entities.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ export declare const CopySubscription: z.ZodObject<{
|
|
|
31
31
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
32
32
|
createdAt: z.ZodString;
|
|
33
33
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
35
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
34
36
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
35
37
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
36
38
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
37
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
38
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
39
39
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
40
40
|
id: z.ZodUUID;
|
|
41
41
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -321,11 +321,11 @@ export declare const CopyEndedSubscriptionWithVolume: z.ZodObject<{
|
|
|
321
321
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
322
322
|
createdAt: z.ZodString;
|
|
323
323
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
324
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
325
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
324
326
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
325
327
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
326
328
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
327
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
328
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
329
329
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
330
330
|
id: z.ZodUUID;
|
|
331
331
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -606,11 +606,11 @@ export declare const CopySubscriptionRead: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
606
606
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
607
607
|
createdAt: z.ZodString;
|
|
608
608
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
609
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
610
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
609
611
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
610
612
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
611
613
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
612
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
613
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
614
614
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
615
615
|
id: z.ZodUUID;
|
|
616
616
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -778,13 +778,19 @@ export declare const CopySkipReason: z.ZodEnum<{
|
|
|
778
778
|
FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
|
|
779
779
|
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
780
780
|
LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
|
|
781
|
+
FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
|
|
782
|
+
FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
|
|
783
|
+
TRUE_UP_STALE: "TRUE_UP_STALE";
|
|
784
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
781
785
|
}>;
|
|
782
786
|
export type CopySkipReason = z.infer<typeof CopySkipReason>;
|
|
783
787
|
export declare const CopyLeaderAction: z.ZodEnum<{
|
|
788
|
+
TWAP: "TWAP";
|
|
784
789
|
OPEN: "OPEN";
|
|
785
|
-
ADJUST: "ADJUST";
|
|
786
790
|
CLOSE: "CLOSE";
|
|
791
|
+
ADJUST: "ADJUST";
|
|
787
792
|
REVERSE: "REVERSE";
|
|
793
|
+
TWAP_END: "TWAP_END";
|
|
788
794
|
}>;
|
|
789
795
|
export type CopyLeaderAction = z.infer<typeof CopyLeaderAction>;
|
|
790
796
|
/** Leader execution provenance; these resources are never installed on the follower. */
|
|
@@ -798,8 +804,8 @@ export declare const CopyExecutionSource: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
798
804
|
triggerId: z.ZodString;
|
|
799
805
|
triggerIntent: z.ZodEnum<{
|
|
800
806
|
OPEN: "OPEN";
|
|
801
|
-
ADJUST: "ADJUST";
|
|
802
807
|
CLOSE: "CLOSE";
|
|
808
|
+
ADJUST: "ADJUST";
|
|
803
809
|
}>;
|
|
804
810
|
bracketType: z.ZodOptional<z.ZodString>;
|
|
805
811
|
ladderId: z.ZodOptional<z.ZodString>;
|
|
@@ -808,6 +814,51 @@ export declare const CopyExecutionSource: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
808
814
|
configId: z.ZodString;
|
|
809
815
|
}, z.core.$strip>], "origin">;
|
|
810
816
|
export type CopyExecutionSource = z.infer<typeof CopyExecutionSource>;
|
|
817
|
+
/** Why the follower TWAP has fewer slices than the leader's. */
|
|
818
|
+
export declare const CopyActivityTWAPReduction: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
819
|
+
kind: z.ZodLiteral<"NONE">;
|
|
820
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
821
|
+
kind: z.ZodLiteral<"MINIMUM">;
|
|
822
|
+
limitingLegs: z.ZodArray<z.ZodObject<{
|
|
823
|
+
symbol: z.ZodString;
|
|
824
|
+
minimumNotional: z.ZodString;
|
|
825
|
+
}, z.core.$strip>>;
|
|
826
|
+
}, z.core.$strip>], "kind">;
|
|
827
|
+
export type CopyActivityTWAPReduction = z.infer<typeof CopyActivityTWAPReduction>;
|
|
828
|
+
/** The follower TWAP a copied leader TWAP created, and how far it has run. */
|
|
829
|
+
export declare const CopyActivityTWAP: z.ZodObject<{
|
|
830
|
+
intent: z.ZodEnum<{
|
|
831
|
+
OPEN: "OPEN";
|
|
832
|
+
CLOSE: "CLOSE";
|
|
833
|
+
}>;
|
|
834
|
+
totalNotional: z.ZodString;
|
|
835
|
+
startAt: z.ZodString;
|
|
836
|
+
endAt: z.ZodString;
|
|
837
|
+
sliceCount: z.ZodNumber;
|
|
838
|
+
sliceIntervalSec: z.ZodNumber;
|
|
839
|
+
leaderSliceCount: z.ZodNumber;
|
|
840
|
+
reduction: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
841
|
+
kind: z.ZodLiteral<"NONE">;
|
|
842
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
843
|
+
kind: z.ZodLiteral<"MINIMUM">;
|
|
844
|
+
limitingLegs: z.ZodArray<z.ZodObject<{
|
|
845
|
+
symbol: z.ZodString;
|
|
846
|
+
minimumNotional: z.ZodString;
|
|
847
|
+
}, z.core.$strip>>;
|
|
848
|
+
}, z.core.$strip>], "kind">;
|
|
849
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
850
|
+
status: z.ZodEnum<{
|
|
851
|
+
ACTIVE: "ACTIVE";
|
|
852
|
+
COMPLETED: "COMPLETED";
|
|
853
|
+
FAILED: "FAILED";
|
|
854
|
+
CANCELLED: "CANCELLED";
|
|
855
|
+
}>;
|
|
856
|
+
filledNotional: z.ZodString;
|
|
857
|
+
executedSliceCount: z.ZodNumber;
|
|
858
|
+
partiallyFilled: z.ZodBoolean;
|
|
859
|
+
}, z.core.$strip>>;
|
|
860
|
+
}, z.core.$strip>;
|
|
861
|
+
export type CopyActivityTWAP = z.infer<typeof CopyActivityTWAP>;
|
|
811
862
|
/**
|
|
812
863
|
* One leader action, and what it meant for this follower.
|
|
813
864
|
*
|
|
@@ -818,10 +869,12 @@ export type CopyExecutionSource = z.infer<typeof CopyExecutionSource>;
|
|
|
818
869
|
export declare const CopyActivity: z.ZodObject<{
|
|
819
870
|
id: z.ZodUUID;
|
|
820
871
|
leaderAction: z.ZodEnum<{
|
|
872
|
+
TWAP: "TWAP";
|
|
821
873
|
OPEN: "OPEN";
|
|
822
|
-
ADJUST: "ADJUST";
|
|
823
874
|
CLOSE: "CLOSE";
|
|
875
|
+
ADJUST: "ADJUST";
|
|
824
876
|
REVERSE: "REVERSE";
|
|
877
|
+
TWAP_END: "TWAP_END";
|
|
825
878
|
}>;
|
|
826
879
|
executionSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
827
880
|
origin: z.ZodLiteral<"DIRECT">;
|
|
@@ -833,8 +886,8 @@ export declare const CopyActivity: z.ZodObject<{
|
|
|
833
886
|
triggerId: z.ZodString;
|
|
834
887
|
triggerIntent: z.ZodEnum<{
|
|
835
888
|
OPEN: "OPEN";
|
|
836
|
-
ADJUST: "ADJUST";
|
|
837
889
|
CLOSE: "CLOSE";
|
|
890
|
+
ADJUST: "ADJUST";
|
|
838
891
|
}>;
|
|
839
892
|
bracketType: z.ZodOptional<z.ZodString>;
|
|
840
893
|
ladderId: z.ZodOptional<z.ZodString>;
|
|
@@ -868,6 +921,10 @@ export declare const CopyActivity: z.ZodObject<{
|
|
|
868
921
|
FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
|
|
869
922
|
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
870
923
|
LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
|
|
924
|
+
FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
|
|
925
|
+
FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
|
|
926
|
+
TRUE_UP_STALE: "TRUE_UP_STALE";
|
|
927
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
871
928
|
}>>;
|
|
872
929
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
873
930
|
followerLegs: z.ZodArray<z.ZodObject<{
|
|
@@ -876,9 +933,102 @@ export declare const CopyActivity: z.ZodObject<{
|
|
|
876
933
|
deltaQuantity: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
877
934
|
}, z.core.$strip>>;
|
|
878
935
|
leaderEquityFraction: z.ZodOptional<z.ZodString>;
|
|
936
|
+
twap: z.ZodOptional<z.ZodObject<{
|
|
937
|
+
intent: z.ZodEnum<{
|
|
938
|
+
OPEN: "OPEN";
|
|
939
|
+
CLOSE: "CLOSE";
|
|
940
|
+
}>;
|
|
941
|
+
totalNotional: z.ZodString;
|
|
942
|
+
startAt: z.ZodString;
|
|
943
|
+
endAt: z.ZodString;
|
|
944
|
+
sliceCount: z.ZodNumber;
|
|
945
|
+
sliceIntervalSec: z.ZodNumber;
|
|
946
|
+
leaderSliceCount: z.ZodNumber;
|
|
947
|
+
reduction: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
948
|
+
kind: z.ZodLiteral<"NONE">;
|
|
949
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
950
|
+
kind: z.ZodLiteral<"MINIMUM">;
|
|
951
|
+
limitingLegs: z.ZodArray<z.ZodObject<{
|
|
952
|
+
symbol: z.ZodString;
|
|
953
|
+
minimumNotional: z.ZodString;
|
|
954
|
+
}, z.core.$strip>>;
|
|
955
|
+
}, z.core.$strip>], "kind">;
|
|
956
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
957
|
+
status: z.ZodEnum<{
|
|
958
|
+
ACTIVE: "ACTIVE";
|
|
959
|
+
COMPLETED: "COMPLETED";
|
|
960
|
+
FAILED: "FAILED";
|
|
961
|
+
CANCELLED: "CANCELLED";
|
|
962
|
+
}>;
|
|
963
|
+
filledNotional: z.ZodString;
|
|
964
|
+
executedSliceCount: z.ZodNumber;
|
|
965
|
+
partiallyFilled: z.ZodBoolean;
|
|
966
|
+
}, z.core.$strip>>;
|
|
967
|
+
}, z.core.$strip>>;
|
|
879
968
|
createdAt: z.ZodString;
|
|
880
969
|
}, z.core.$strip>;
|
|
881
970
|
export type CopyActivity = z.infer<typeof CopyActivity>;
|
|
971
|
+
/** Whether every open position on the follower account follows the leader. */
|
|
972
|
+
export declare const CopyCoverage: z.ZodEnum<{
|
|
973
|
+
FULLY_COPY: "FULLY_COPY";
|
|
974
|
+
PARTIALLY_COPY: "PARTIALLY_COPY";
|
|
975
|
+
}>;
|
|
976
|
+
export type CopyCoverage = z.infer<typeof CopyCoverage>;
|
|
977
|
+
/** Why a leader position lifecycle no longer copies; the follower manages its copied position, including the close. */
|
|
978
|
+
export declare const CopyControlTransferReason: z.ZodEnum<{
|
|
979
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
980
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
981
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
982
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
983
|
+
LIQUIDATED: "LIQUIDATED";
|
|
984
|
+
}>;
|
|
985
|
+
export type CopyControlTransferReason = z.infer<typeof CopyControlTransferReason>;
|
|
986
|
+
/** Why a follower position is outside copy management: released from copy, or never copied at all. */
|
|
987
|
+
export declare const CopyUnmanagedFollowerPositionReason: z.ZodEnum<{
|
|
988
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
989
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
990
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
991
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
992
|
+
LIQUIDATED: "LIQUIDATED";
|
|
993
|
+
EXISTING_AT_ADMISSION: "EXISTING_AT_ADMISSION";
|
|
994
|
+
MANUAL_POSITION: "MANUAL_POSITION";
|
|
995
|
+
}>;
|
|
996
|
+
export type CopyUnmanagedFollowerPositionReason = z.infer<typeof CopyUnmanagedFollowerPositionReason>;
|
|
997
|
+
/** One open position copy does not manage, on either side of the subscription. */
|
|
998
|
+
export declare const CopyUnmanagedPosition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
999
|
+
kind: z.ZodLiteral<"FOLLOWER_POSITION">;
|
|
1000
|
+
positionId: z.ZodUUID;
|
|
1001
|
+
reason: z.ZodEnum<{
|
|
1002
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
1003
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
1004
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
1005
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
1006
|
+
LIQUIDATED: "LIQUIDATED";
|
|
1007
|
+
EXISTING_AT_ADMISSION: "EXISTING_AT_ADMISSION";
|
|
1008
|
+
MANUAL_POSITION: "MANUAL_POSITION";
|
|
1009
|
+
}>;
|
|
1010
|
+
detectedAt: z.ZodString;
|
|
1011
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
1012
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1013
|
+
kind: z.ZodLiteral<"LEADER_POSITION">;
|
|
1014
|
+
positionId: z.ZodUUID;
|
|
1015
|
+
reason: z.ZodEnum<{
|
|
1016
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
1017
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
1018
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
1019
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
1020
|
+
LIQUIDATED: "LIQUIDATED";
|
|
1021
|
+
}>;
|
|
1022
|
+
detectedAt: z.ZodString;
|
|
1023
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
1024
|
+
}, z.core.$strip>], "kind">;
|
|
1025
|
+
export type CopyUnmanagedPosition = z.infer<typeof CopyUnmanagedPosition>;
|
|
1026
|
+
/** One open follower position copy manages, so a symbol-wide setting change can name what it would release. */
|
|
1027
|
+
export declare const CopyManagedPosition: z.ZodObject<{
|
|
1028
|
+
positionId: z.ZodUUID;
|
|
1029
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
1030
|
+
}, z.core.$strip>;
|
|
1031
|
+
export type CopyManagedPosition = z.infer<typeof CopyManagedPosition>;
|
|
882
1032
|
/** A current follower account with only its owner's publishable X identity. */
|
|
883
1033
|
export declare const CopyFollower: z.ZodObject<{
|
|
884
1034
|
tradeAccountId: z.ZodUUID;
|
package/dist/copy/responses.d.ts
CHANGED
|
@@ -146,6 +146,41 @@ export declare const CopyStateResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
146
146
|
pearFee: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
147
147
|
totalNetPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
148
148
|
}, z.core.$strip>;
|
|
149
|
+
coverage: z.ZodEnum<{
|
|
150
|
+
FULLY_COPY: "FULLY_COPY";
|
|
151
|
+
PARTIALLY_COPY: "PARTIALLY_COPY";
|
|
152
|
+
}>;
|
|
153
|
+
unmanagedPositions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
154
|
+
kind: z.ZodLiteral<"FOLLOWER_POSITION">;
|
|
155
|
+
positionId: z.ZodUUID;
|
|
156
|
+
reason: z.ZodEnum<{
|
|
157
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
158
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
159
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
160
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
161
|
+
LIQUIDATED: "LIQUIDATED";
|
|
162
|
+
EXISTING_AT_ADMISSION: "EXISTING_AT_ADMISSION";
|
|
163
|
+
MANUAL_POSITION: "MANUAL_POSITION";
|
|
164
|
+
}>;
|
|
165
|
+
detectedAt: z.ZodString;
|
|
166
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
kind: z.ZodLiteral<"LEADER_POSITION">;
|
|
169
|
+
positionId: z.ZodUUID;
|
|
170
|
+
reason: z.ZodEnum<{
|
|
171
|
+
LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
|
|
172
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
173
|
+
FOLLOWER_INTERVENTION: "FOLLOWER_INTERVENTION";
|
|
174
|
+
EXTERNAL_SYNC: "EXTERNAL_SYNC";
|
|
175
|
+
LIQUIDATED: "LIQUIDATED";
|
|
176
|
+
}>;
|
|
177
|
+
detectedAt: z.ZodString;
|
|
178
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>], "kind">>;
|
|
180
|
+
managedPositions: z.ZodArray<z.ZodObject<{
|
|
181
|
+
positionId: z.ZodUUID;
|
|
182
|
+
instrumentIds: z.ZodArray<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
149
184
|
}, z.core.$strip>], "state">;
|
|
150
185
|
export type CopyStateResponse = z.output<typeof CopyStateResponse>;
|
|
151
186
|
/** All current follower accounts, including accounts without X. */
|
|
@@ -169,11 +204,11 @@ export declare const CopySubscriptionResponse: z.ZodObject<{
|
|
|
169
204
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
170
205
|
createdAt: z.ZodString;
|
|
171
206
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
207
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
208
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
172
209
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
173
210
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
174
211
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
175
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
176
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
177
212
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
178
213
|
id: z.ZodUUID;
|
|
179
214
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -317,11 +352,11 @@ export declare const EndCopySubscriptionResponse: z.ZodObject<{
|
|
|
317
352
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
318
353
|
createdAt: z.ZodString;
|
|
319
354
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
355
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
356
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
320
357
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
321
358
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
322
359
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
323
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
324
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
325
360
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
326
361
|
id: z.ZodUUID;
|
|
327
362
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -485,6 +520,10 @@ export declare const CopyJoinResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
485
520
|
FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
|
|
486
521
|
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
487
522
|
LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
|
|
523
|
+
FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
|
|
524
|
+
FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
|
|
525
|
+
TRUE_UP_STALE: "TRUE_UP_STALE";
|
|
526
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
488
527
|
}>;
|
|
489
528
|
}, z.core.$strip>, z.ZodObject<{
|
|
490
529
|
leaderPositionId: z.ZodUUID;
|
|
@@ -502,11 +541,11 @@ export declare const CreateCopySubscriptionResponse: z.ZodObject<{
|
|
|
502
541
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
503
542
|
createdAt: z.ZodString;
|
|
504
543
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
544
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
545
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
505
546
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
506
547
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
507
548
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
508
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
509
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
510
549
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
511
550
|
id: z.ZodUUID;
|
|
512
551
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -667,6 +706,10 @@ export declare const CreateCopySubscriptionResponse: z.ZodObject<{
|
|
|
667
706
|
FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
|
|
668
707
|
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
669
708
|
LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
|
|
709
|
+
FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
|
|
710
|
+
FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
|
|
711
|
+
TRUE_UP_STALE: "TRUE_UP_STALE";
|
|
712
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
670
713
|
}>;
|
|
671
714
|
}, z.core.$strip>, z.ZodObject<{
|
|
672
715
|
leaderPositionId: z.ZodUUID;
|
|
@@ -826,11 +869,11 @@ export declare const CopySubscriptionListResponse: z.ZodObject<{
|
|
|
826
869
|
latestFillAt: z.ZodOptional<z.ZodString>;
|
|
827
870
|
createdAt: z.ZodString;
|
|
828
871
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
872
|
+
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
873
|
+
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
829
874
|
grossRealizedPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
830
875
|
grossUpnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
831
876
|
fundingPayment: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
832
|
-
tradeFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
833
|
-
pearFee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
834
877
|
totalNetPnl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
835
878
|
id: z.ZodUUID;
|
|
836
879
|
leaderTradeAccountId: z.ZodUUID;
|
|
@@ -968,10 +1011,12 @@ export declare const CopyActivityListResponse: z.ZodObject<{
|
|
|
968
1011
|
activities: z.ZodArray<z.ZodObject<{
|
|
969
1012
|
id: z.ZodUUID;
|
|
970
1013
|
leaderAction: z.ZodEnum<{
|
|
1014
|
+
TWAP: "TWAP";
|
|
971
1015
|
OPEN: "OPEN";
|
|
972
|
-
ADJUST: "ADJUST";
|
|
973
1016
|
CLOSE: "CLOSE";
|
|
1017
|
+
ADJUST: "ADJUST";
|
|
974
1018
|
REVERSE: "REVERSE";
|
|
1019
|
+
TWAP_END: "TWAP_END";
|
|
975
1020
|
}>;
|
|
976
1021
|
executionSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
977
1022
|
origin: z.ZodLiteral<"DIRECT">;
|
|
@@ -983,8 +1028,8 @@ export declare const CopyActivityListResponse: z.ZodObject<{
|
|
|
983
1028
|
triggerId: z.ZodString;
|
|
984
1029
|
triggerIntent: z.ZodEnum<{
|
|
985
1030
|
OPEN: "OPEN";
|
|
986
|
-
ADJUST: "ADJUST";
|
|
987
1031
|
CLOSE: "CLOSE";
|
|
1032
|
+
ADJUST: "ADJUST";
|
|
988
1033
|
}>;
|
|
989
1034
|
bracketType: z.ZodOptional<z.ZodString>;
|
|
990
1035
|
ladderId: z.ZodOptional<z.ZodString>;
|
|
@@ -1018,6 +1063,10 @@ export declare const CopyActivityListResponse: z.ZodObject<{
|
|
|
1018
1063
|
FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
|
|
1019
1064
|
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
1020
1065
|
LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
|
|
1066
|
+
FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
|
|
1067
|
+
FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
|
|
1068
|
+
TRUE_UP_STALE: "TRUE_UP_STALE";
|
|
1069
|
+
ASSET_CONFLICT: "ASSET_CONFLICT";
|
|
1021
1070
|
}>>;
|
|
1022
1071
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
1023
1072
|
followerLegs: z.ZodArray<z.ZodObject<{
|
|
@@ -1026,6 +1075,38 @@ export declare const CopyActivityListResponse: z.ZodObject<{
|
|
|
1026
1075
|
deltaQuantity: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
1027
1076
|
}, z.core.$strip>>;
|
|
1028
1077
|
leaderEquityFraction: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
twap: z.ZodOptional<z.ZodObject<{
|
|
1079
|
+
intent: z.ZodEnum<{
|
|
1080
|
+
OPEN: "OPEN";
|
|
1081
|
+
CLOSE: "CLOSE";
|
|
1082
|
+
}>;
|
|
1083
|
+
totalNotional: z.ZodString;
|
|
1084
|
+
startAt: z.ZodString;
|
|
1085
|
+
endAt: z.ZodString;
|
|
1086
|
+
sliceCount: z.ZodNumber;
|
|
1087
|
+
sliceIntervalSec: z.ZodNumber;
|
|
1088
|
+
leaderSliceCount: z.ZodNumber;
|
|
1089
|
+
reduction: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1090
|
+
kind: z.ZodLiteral<"NONE">;
|
|
1091
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1092
|
+
kind: z.ZodLiteral<"MINIMUM">;
|
|
1093
|
+
limitingLegs: z.ZodArray<z.ZodObject<{
|
|
1094
|
+
symbol: z.ZodString;
|
|
1095
|
+
minimumNotional: z.ZodString;
|
|
1096
|
+
}, z.core.$strip>>;
|
|
1097
|
+
}, z.core.$strip>], "kind">;
|
|
1098
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
1099
|
+
status: z.ZodEnum<{
|
|
1100
|
+
ACTIVE: "ACTIVE";
|
|
1101
|
+
COMPLETED: "COMPLETED";
|
|
1102
|
+
FAILED: "FAILED";
|
|
1103
|
+
CANCELLED: "CANCELLED";
|
|
1104
|
+
}>;
|
|
1105
|
+
filledNotional: z.ZodString;
|
|
1106
|
+
executedSliceCount: z.ZodNumber;
|
|
1107
|
+
partiallyFilled: z.ZodBoolean;
|
|
1108
|
+
}, z.core.$strip>>;
|
|
1109
|
+
}, z.core.$strip>>;
|
|
1029
1110
|
createdAt: z.ZodString;
|
|
1030
1111
|
}, z.core.$strip>>;
|
|
1031
1112
|
}, z.core.$strip>;
|
|
@@ -1057,14 +1138,16 @@ export declare const CopyFollowerStats: z.ZodObject<{
|
|
|
1057
1138
|
}>;
|
|
1058
1139
|
copiedTrades: z.ZodNumber;
|
|
1059
1140
|
copiedVolumeUsd: z.ZodString;
|
|
1141
|
+
rewardsEarnedUsd: z.ZodString;
|
|
1060
1142
|
}, z.core.$strip>;
|
|
1061
1143
|
export type CopyFollowerStats = z.output<typeof CopyFollowerStats>;
|
|
1062
|
-
/** Owner-only copy totals from tagged history; date filters apply only to trades and
|
|
1144
|
+
/** Owner-only copy totals from tagged history; date filters apply only to trades, volume and leader reward earnings. */
|
|
1063
1145
|
export declare const CopyStatsResponse: z.ZodObject<{
|
|
1064
1146
|
currentFollowerCount: z.ZodNumber;
|
|
1065
1147
|
lifetimeFollowerCount: z.ZodNumber;
|
|
1066
1148
|
copiedTrades: z.ZodNumber;
|
|
1067
1149
|
copiedVolumeUsd: z.ZodString;
|
|
1150
|
+
rewardsEarnedUsd: z.ZodString;
|
|
1068
1151
|
followers: z.ZodArray<z.ZodObject<{
|
|
1069
1152
|
tradeAccountId: z.ZodUUID;
|
|
1070
1153
|
xUserId: z.ZodOptional<z.ZodString>;
|
|
@@ -1077,6 +1160,7 @@ export declare const CopyStatsResponse: z.ZodObject<{
|
|
|
1077
1160
|
}>;
|
|
1078
1161
|
copiedTrades: z.ZodNumber;
|
|
1079
1162
|
copiedVolumeUsd: z.ZodString;
|
|
1163
|
+
rewardsEarnedUsd: z.ZodString;
|
|
1080
1164
|
}, z.core.$strip>>;
|
|
1081
1165
|
}, z.core.$strip>;
|
|
1082
1166
|
export type CopyStatsResponse = z.output<typeof CopyStatsResponse>;
|