diff --git a/indexer/packages/postgres/src/constants.ts b/indexer/packages/postgres/src/constants.ts index 900c2e6038..97846f3f37 100644 --- a/indexer/packages/postgres/src/constants.ts +++ b/indexer/packages/postgres/src/constants.ts @@ -110,6 +110,7 @@ Record = { [ClobPairStatus.CLOB_PAIR_STATUS_PAUSED]: PerpetualMarketStatus.PAUSED, [ClobPairStatus.CLOB_PAIR_STATUS_POST_ONLY]: PerpetualMarketStatus.POST_ONLY, [ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING]: PerpetualMarketStatus.INITIALIZING, + [ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT]: PerpetualMarketStatus.FINAL_SETTLEMENT, }; export const DEFAULT_POSTGRES_OPTIONS : Options = config.USE_READ_REPLICA diff --git a/indexer/packages/postgres/src/types/perpetual-market-types.ts b/indexer/packages/postgres/src/types/perpetual-market-types.ts index 65962fb655..13318b3c68 100644 --- a/indexer/packages/postgres/src/types/perpetual-market-types.ts +++ b/indexer/packages/postgres/src/types/perpetual-market-types.ts @@ -60,4 +60,5 @@ export enum PerpetualMarketStatus { CANCEL_ONLY = 'CANCEL_ONLY', POST_ONLY = 'POST_ONLY', INITIALIZING = 'INITIALIZING', + FINAL_SETTLEMENT = 'FINAL_SETTLEMENT', } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts index d0bba0007e..f0c6ab0c2b 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts @@ -33,6 +33,14 @@ export enum ClobPair_Status { * both short-term and post-only. */ STATUS_INITIALIZING = 5, + + /** + * STATUS_FINAL_SETTLEMENT - STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + * and trading has ceased. All open positions will be closed by the + * protocol. Open stateful orders will be cancelled. Open short-term + * orders will be left to expire. + */ + STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } /** Status of the CLOB. */ @@ -68,6 +76,14 @@ export enum ClobPair_StatusSDKType { * both short-term and post-only. */ STATUS_INITIALIZING = 5, + + /** + * STATUS_FINAL_SETTLEMENT - STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + * and trading has ceased. All open positions will be closed by the + * protocol. Open stateful orders will be cancelled. Open short-term + * orders will be left to expire. + */ + STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } export function clobPair_StatusFromJSON(object: any): ClobPair_Status { @@ -96,6 +112,10 @@ export function clobPair_StatusFromJSON(object: any): ClobPair_Status { case "STATUS_INITIALIZING": return ClobPair_Status.STATUS_INITIALIZING; + case 6: + case "STATUS_FINAL_SETTLEMENT": + return ClobPair_Status.STATUS_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -122,6 +142,9 @@ export function clobPair_StatusToJSON(object: ClobPair_Status): string { case ClobPair_Status.STATUS_INITIALIZING: return "STATUS_INITIALIZING"; + case ClobPair_Status.STATUS_FINAL_SETTLEMENT: + return "STATUS_FINAL_SETTLEMENT"; + case ClobPair_Status.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts index e25b4b9767..92995bc19d 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts @@ -307,6 +307,14 @@ export enum ClobPairStatus { * both short-term and post-only. */ CLOB_PAIR_STATUS_INITIALIZING = 5, + + /** + * CLOB_PAIR_STATUS_FINAL_SETTLEMENT - CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + * deactivated. Clob pairs in this state do not accept new orders and trading + * is blocked. All open positions are closed by the protocol when the clob + * pair gains this status. + */ + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } /** @@ -348,6 +356,14 @@ export enum ClobPairStatusSDKType { * both short-term and post-only. */ CLOB_PAIR_STATUS_INITIALIZING = 5, + + /** + * CLOB_PAIR_STATUS_FINAL_SETTLEMENT - CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + * deactivated. Clob pairs in this state do not accept new orders and trading + * is blocked. All open positions are closed by the protocol when the clob + * pair gains this status. + */ + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } export function clobPairStatusFromJSON(object: any): ClobPairStatus { @@ -376,6 +392,10 @@ export function clobPairStatusFromJSON(object: any): ClobPairStatus { case "CLOB_PAIR_STATUS_INITIALIZING": return ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING; + case 6: + case "CLOB_PAIR_STATUS_FINAL_SETTLEMENT": + return ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -402,6 +422,9 @@ export function clobPairStatusToJSON(object: ClobPairStatus): string { case ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING: return "CLOB_PAIR_STATUS_INITIALIZING"; + case ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT: + return "CLOB_PAIR_STATUS_FINAL_SETTLEMENT"; + case ClobPairStatus.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts index bd787a70e8..970a5c8e2c 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts @@ -75,6 +75,9 @@ export enum OrderRemovalReason { * equity tier requirements. */ ORDER_REMOVAL_REASON_EQUITY_TIER = 13, + + /** ORDER_REMOVAL_REASON_FINAL_SETTLEMENT - The order has been removed since its ClobPair has entered final settlement. */ + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14, UNRECOGNIZED = -1, } /** OrderRemovalReason is an enum of all the reasons an order was removed. */ @@ -155,6 +158,9 @@ export enum OrderRemovalReasonSDKType { * equity tier requirements. */ ORDER_REMOVAL_REASON_EQUITY_TIER = 13, + + /** ORDER_REMOVAL_REASON_FINAL_SETTLEMENT - The order has been removed since its ClobPair has entered final settlement. */ + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14, UNRECOGNIZED = -1, } export function orderRemovalReasonFromJSON(object: any): OrderRemovalReason { @@ -215,6 +221,10 @@ export function orderRemovalReasonFromJSON(object: any): OrderRemovalReason { case "ORDER_REMOVAL_REASON_EQUITY_TIER": return OrderRemovalReason.ORDER_REMOVAL_REASON_EQUITY_TIER; + case 14: + case "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT": + return OrderRemovalReason.ORDER_REMOVAL_REASON_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -265,6 +275,9 @@ export function orderRemovalReasonToJSON(object: OrderRemovalReason): string { case OrderRemovalReason.ORDER_REMOVAL_REASON_EQUITY_TIER: return "ORDER_REMOVAL_REASON_EQUITY_TIER"; + case OrderRemovalReason.ORDER_REMOVAL_REASON_FINAL_SETTLEMENT: + return "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT"; + case OrderRemovalReason.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/services/comlink/public/api-documentation.md b/indexer/services/comlink/public/api-documentation.md index f499988468..bd09dc6402 100644 --- a/indexer/services/comlink/public/api-documentation.md +++ b/indexer/services/comlink/public/api-documentation.md @@ -2816,6 +2816,7 @@ or |*anonymous*|CANCEL_ONLY| |*anonymous*|POST_ONLY| |*anonymous*|INITIALIZING| +|*anonymous*|FINAL_SETTLEMENT| ## PerpetualMarketResponseObject diff --git a/indexer/services/comlink/public/swagger.json b/indexer/services/comlink/public/swagger.json index 888773a9d4..fc2e3db6be 100644 --- a/indexer/services/comlink/public/swagger.json +++ b/indexer/services/comlink/public/swagger.json @@ -686,7 +686,8 @@ "PAUSED", "CANCEL_ONLY", "POST_ONLY", - "INITIALIZING" + "INITIALIZING", + "FINAL_SETTLEMENT" ], "type": "string" }, diff --git a/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql b/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql index a4ea28e715..fe6f2be178 100644 --- a/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql +++ b/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql @@ -17,6 +17,7 @@ BEGIN WHEN '3'::jsonb THEN RETURN 'CANCEL_ONLY'; /** CLOB_PAIR_STATUS_CANCEL_ONLY */ WHEN '4'::jsonb THEN RETURN 'POST_ONLY'; /** CLOB_PAIR_STATUS_POST_ONLY */ WHEN '5'::jsonb THEN RETURN 'INITIALIZING'; /** CLOB_PAIR_STATUS_INITIALIZING */ + WHEN '6'::jsonb THEN RETURN 'FINAL_SETTLEMENT'; /** CLOB_PAIR_STATUS_FINAL_SETTLEMENT */ ELSE RAISE EXCEPTION 'Invalid clob pair status: %', status; END CASE; END; diff --git a/proto/dydxprotocol/clob/clob_pair.proto b/proto/dydxprotocol/clob/clob_pair.proto index 4668851dea..2ad28d4281 100644 --- a/proto/dydxprotocol/clob/clob_pair.proto +++ b/proto/dydxprotocol/clob/clob_pair.proto @@ -65,6 +65,11 @@ message ClobPair { // Clob pairs in this state only accept orders which are // both short-term and post-only. STATUS_INITIALIZING = 5; + // STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + // and trading has ceased. All open positions will be closed by the + // protocol. Open stateful orders will be cancelled. Open short-term + // orders will be left to expire. + STATUS_FINAL_SETTLEMENT = 6; } Status status = 7; diff --git a/proto/dydxprotocol/indexer/protocol/v1/clob.proto b/proto/dydxprotocol/indexer/protocol/v1/clob.proto index 7c30fbcf87..b7b52b0a69 100644 --- a/proto/dydxprotocol/indexer/protocol/v1/clob.proto +++ b/proto/dydxprotocol/indexer/protocol/v1/clob.proto @@ -173,4 +173,9 @@ enum ClobPairStatus { // Clob pairs in this state only accept orders which are // both short-term and post-only. CLOB_PAIR_STATUS_INITIALIZING = 5; + // CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + // deactivated. Clob pairs in this state do not accept new orders and trading + // is blocked. All open positions are closed by the protocol when the clob + // pair gains this status. + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6; } diff --git a/proto/dydxprotocol/indexer/shared/removal_reason.proto b/proto/dydxprotocol/indexer/shared/removal_reason.proto index 7787e6571a..be81d025d2 100644 --- a/proto/dydxprotocol/indexer/shared/removal_reason.proto +++ b/proto/dydxprotocol/indexer/shared/removal_reason.proto @@ -51,4 +51,6 @@ enum OrderRemovalReason { // The order has been removed since the subaccount does not satisfy the // equity tier requirements. ORDER_REMOVAL_REASON_EQUITY_TIER = 13; + // The order has been removed since its ClobPair has entered final settlement. + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14; } diff --git a/protocol/indexer/protocol/v1/clob.pb.go b/protocol/indexer/protocol/v1/clob.pb.go index ba1ea7a6d9..6e17da3336 100644 --- a/protocol/indexer/protocol/v1/clob.pb.go +++ b/protocol/indexer/protocol/v1/clob.pb.go @@ -47,6 +47,11 @@ const ( // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPairStatus_CLOB_PAIR_STATUS_INITIALIZING ClobPairStatus = 5 + // CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + // deactivated. Clob pairs in this state do not accept new orders and trading + // is blocked. All open positions are closed by the protocol when the clob + // pair gains this status. + ClobPairStatus_CLOB_PAIR_STATUS_FINAL_SETTLEMENT ClobPairStatus = 6 ) var ClobPairStatus_name = map[int32]string{ @@ -56,15 +61,17 @@ var ClobPairStatus_name = map[int32]string{ 3: "CLOB_PAIR_STATUS_CANCEL_ONLY", 4: "CLOB_PAIR_STATUS_POST_ONLY", 5: "CLOB_PAIR_STATUS_INITIALIZING", + 6: "CLOB_PAIR_STATUS_FINAL_SETTLEMENT", } var ClobPairStatus_value = map[string]int32{ - "CLOB_PAIR_STATUS_UNSPECIFIED": 0, - "CLOB_PAIR_STATUS_ACTIVE": 1, - "CLOB_PAIR_STATUS_PAUSED": 2, - "CLOB_PAIR_STATUS_CANCEL_ONLY": 3, - "CLOB_PAIR_STATUS_POST_ONLY": 4, - "CLOB_PAIR_STATUS_INITIALIZING": 5, + "CLOB_PAIR_STATUS_UNSPECIFIED": 0, + "CLOB_PAIR_STATUS_ACTIVE": 1, + "CLOB_PAIR_STATUS_PAUSED": 2, + "CLOB_PAIR_STATUS_CANCEL_ONLY": 3, + "CLOB_PAIR_STATUS_POST_ONLY": 4, + "CLOB_PAIR_STATUS_INITIALIZING": 5, + "CLOB_PAIR_STATUS_FINAL_SETTLEMENT": 6, } func (x ClobPairStatus) String() string { @@ -479,58 +486,59 @@ func init() { } var fileDescriptor_fac8923e70f7ca3c = []byte{ - // 809 bytes of a gzipped FileDescriptorProto + // 830 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x73, 0xdb, 0x54, - 0x14, 0xb5, 0x1c, 0xb7, 0x71, 0xae, 0x3f, 0x10, 0x8f, 0x32, 0x15, 0x49, 0xeb, 0x18, 0x2f, 0x20, - 0x03, 0x83, 0x4d, 0x5a, 0x58, 0xc0, 0xc0, 0xc2, 0x56, 0xe4, 0xf6, 0x4d, 0x54, 0x49, 0x48, 0x0a, - 0x4c, 0xba, 0xe0, 0x21, 0x4b, 0x2f, 0xee, 0x9b, 0xca, 0x7a, 0x41, 0x96, 0x32, 0xf5, 0x8e, 0x9f, - 0xc0, 0xcf, 0xea, 0xb2, 0xb0, 0x60, 0x58, 0x31, 0x4c, 0xf2, 0x47, 0x98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xee, 0x9b, 0xf8, + 0x19, 0xb6, 0x9e, 0xa8, 0x77, 0xd0, 0x87, 0xf0, 0x70, 0x8d, 0x32, 0xc4, 0x56, 0xdf, 0xa4, 0xae, + 0x41, 0x88, 0x69, 0x1c, 0x1b, 0x16, 0x51, 0x37, 0x07, 0x3f, 0xbc, 0xba, 0x6c, 0x29, 0xaf, 0x2f, + 0x5b, 0xca, 0x5f, 0x97, 0x2d, 0xe5, 0xd7, 0xab, 0x56, 0xe9, 0xf5, 0x55, 0xab, 0xf4, 0xc7, 0x55, + 0xab, 0xf4, 0xec, 0xdb, 0x09, 0x4f, 0x9e, 0xcf, 0xc7, 0x5d, 0x5f, 0x4c, 0x7b, 0x2b, 0x9f, 0x85, + 0x8b, 0x2f, 0x3e, 0xf3, 0x9f, 0x7b, 0x3c, 0xea, 0xfd, 0xd7, 0x87, 0x62, 0xbc, 0x99, 0x16, 0x8f, + 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x08, 0xc4, 0xc7, 0xa2, 0x06, 0x00, 0x00, } func (m *IndexerOrderId) Marshal() (dAtA []byte, err error) { diff --git a/protocol/indexer/protocol/v1/v1_mappers.go b/protocol/indexer/protocol/v1/v1_mappers.go index 275263257c..b404d3435c 100644 --- a/protocol/indexer/protocol/v1/v1_mappers.go +++ b/protocol/indexer/protocol/v1/v1_mappers.go @@ -176,7 +176,14 @@ func ConvertToClobPairStatus(status clobtypes.ClobPair_Status) ClobPairStatus { return ClobPairStatus_CLOB_PAIR_STATUS_POST_ONLY case clobtypes.ClobPair_STATUS_INITIALIZING: return ClobPairStatus_CLOB_PAIR_STATUS_INITIALIZING + case clobtypes.ClobPair_STATUS_FINAL_SETTLEMENT: + return ClobPairStatus_CLOB_PAIR_STATUS_FINAL_SETTLEMENT default: - panic("invalid clob pair status") + panic( + fmt.Sprintf( + "ConvertToClobPairStatus: invalid clob pair status: %+v", + status, + ), + ) } } diff --git a/protocol/indexer/protocol/v1/v1_mappers_test.go b/protocol/indexer/protocol/v1/v1_mappers_test.go index 66a4a70f1f..af79807302 100644 --- a/protocol/indexer/protocol/v1/v1_mappers_test.go +++ b/protocol/indexer/protocol/v1/v1_mappers_test.go @@ -398,7 +398,10 @@ func TestConvertToClobPairStatus(t *testing.T) { expectedStatus: v1.ClobPairStatus(clobtypes.ClobPair_Status_value[name]), } if value == int32(clobtypes.ClobPair_STATUS_UNSPECIFIED) { - testCase.expectedPanic = "invalid clob pair status" + testCase.expectedPanic = fmt.Sprintf( + "ConvertToClobPairStatus: invalid clob pair status: %+v", + clobtypes.ClobPair_STATUS_UNSPECIFIED, + ) } tests[testName] = testCase } diff --git a/protocol/indexer/shared/removal_reason.pb.go b/protocol/indexer/shared/removal_reason.pb.go index 99a9bf9daf..480302a924 100644 --- a/protocol/indexer/shared/removal_reason.pb.go +++ b/protocol/indexer/shared/removal_reason.pb.go @@ -68,6 +68,8 @@ const ( // The order has been removed since the subaccount does not satisfy the // equity tier requirements. OrderRemovalReason_ORDER_REMOVAL_REASON_EQUITY_TIER OrderRemovalReason = 13 + // The order has been removed since its ClobPair has entered final settlement. + OrderRemovalReason_ORDER_REMOVAL_REASON_FINAL_SETTLEMENT OrderRemovalReason = 14 ) var OrderRemovalReason_name = map[int32]string{ @@ -85,6 +87,7 @@ var OrderRemovalReason_name = map[int32]string{ 11: "ORDER_REMOVAL_REASON_REPLACED", 12: "ORDER_REMOVAL_REASON_FULLY_FILLED", 13: "ORDER_REMOVAL_REASON_EQUITY_TIER", + 14: "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT", } var OrderRemovalReason_value = map[string]int32{ @@ -102,6 +105,7 @@ var OrderRemovalReason_value = map[string]int32{ "ORDER_REMOVAL_REASON_REPLACED": 11, "ORDER_REMOVAL_REASON_FULLY_FILLED": 12, "ORDER_REMOVAL_REASON_EQUITY_TIER": 13, + "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT": 14, } func (x OrderRemovalReason) String() string { @@ -121,33 +125,34 @@ func init() { } var fileDescriptor_0d5eea5cab8c58ba = []byte{ - // 446 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0x13, 0xa0, 0x05, 0x16, 0x90, 0x56, 0x7b, 0x05, 0xac, 0x16, 0x5a, 0x5a, 0xfe, 0xc5, - 0x48, 0x20, 0x54, 0x01, 0x12, 0xda, 0x78, 0x27, 0xd2, 0x2a, 0x1b, 0x6f, 0x18, 0xdb, 0xd0, 0xe4, - 0x32, 0x72, 0x63, 0x8b, 0x44, 0x6a, 0x63, 0xe4, 0x96, 0xaa, 0xbc, 0x01, 0x47, 0x1e, 0x8b, 0x63, - 0x8e, 0x1c, 0x51, 0xf2, 0x22, 0x48, 0x76, 0x40, 0x54, 0x5a, 0x5f, 0x7c, 0xf1, 0xef, 0xf7, 0xcd, - 0x67, 0xef, 0x2c, 0x7b, 0x91, 0x7d, 0xcb, 0x2e, 0xbe, 0x94, 0xc5, 0x59, 0x31, 0x29, 0x8e, 0xfd, - 0xd9, 0x3c, 0xcb, 0x2f, 0xf2, 0xd2, 0x3f, 0x9d, 0xa6, 0x65, 0x9e, 0xf9, 0x65, 0x7e, 0x52, 0x9c, - 0xa7, 0xc7, 0x54, 0xe6, 0xe9, 0x69, 0x31, 0xef, 0x54, 0x98, 0xb8, 0xfb, 0xbf, 0xd1, 0x59, 0x1b, - 0x9d, 0xda, 0x78, 0xf2, 0x7d, 0x83, 0x09, 0x5b, 0x66, 0x79, 0x89, 0xb5, 0x8a, 0x95, 0x29, 0x76, - 0xd8, 0x96, 0x45, 0x05, 0x48, 0x08, 0x03, 0xfb, 0x51, 0x1a, 0x42, 0x90, 0x91, 0x0d, 0x29, 0x09, - 0xa3, 0x21, 0x04, 0xba, 0xa7, 0x41, 0xf1, 0x96, 0xd8, 0x62, 0xf7, 0x9c, 0x14, 0x1c, 0x0e, 0x35, - 0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xbb, 0x7b, 0xd7, 0x05, 0x75, 0x55, 0xf0, 0x76, 0xe3, - 0x36, 0xc1, 0x87, 0x44, 0xc7, 0x23, 0x8a, 0x35, 0x20, 0xbf, 0xd3, 0xc5, 0x9f, 0x4b, 0xaf, 0xbd, - 0x58, 0x7a, 0xed, 0xdf, 0x4b, 0xaf, 0xfd, 0x63, 0xe5, 0xb5, 0x16, 0x2b, 0xaf, 0xf5, 0x6b, 0xe5, - 0xb5, 0xc6, 0x07, 0x9f, 0x67, 0x67, 0xd3, 0xaf, 0x47, 0x9d, 0x49, 0x71, 0xe2, 0x5f, 0x5a, 0xff, - 0xf3, 0x57, 0xcf, 0x27, 0xd3, 0x74, 0x36, 0xf7, 0x1b, 0x2e, 0xc4, 0xd1, 0x66, 0xf5, 0xe2, 0xe5, - 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x84, 0xfa, 0x05, 0x36, 0x03, 0x00, 0x00, + // 461 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x14, 0x85, 0x13, 0xa0, 0x05, 0x86, 0x1f, 0x8d, 0x66, 0x0b, 0x58, 0x2d, 0xb4, 0xb4, 0xfc, 0x25, + 0x48, 0x20, 0x54, 0x01, 0x12, 0x9a, 0x78, 0xae, 0xa5, 0x51, 0xc6, 0x9e, 0x70, 0x3d, 0x86, 0x26, + 0x9b, 0xab, 0x34, 0xb6, 0x48, 0xa4, 0x36, 0x46, 0x6e, 0xa9, 0xca, 0x5b, 0xf0, 0x2e, 0xbc, 0x04, + 0xcb, 0x2e, 0x59, 0xa2, 0xe4, 0x45, 0x10, 0x76, 0x40, 0x54, 0xb2, 0x37, 0xde, 0xf8, 0x7c, 0xe7, + 0x9e, 0x99, 0x33, 0x97, 0x3d, 0x4f, 0xbf, 0xa6, 0x67, 0x9f, 0x8b, 0xfc, 0x24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x61, 0x03, 0x00, 0x00, } diff --git a/protocol/x/clob/types/clob_pair.pb.go b/protocol/x/clob/types/clob_pair.pb.go index 46f2ee4077..49eab1563e 100644 --- a/protocol/x/clob/types/clob_pair.pb.go +++ b/protocol/x/clob/types/clob_pair.pb.go @@ -43,6 +43,11 @@ const ( // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPair_STATUS_INITIALIZING ClobPair_Status = 5 + // STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + // and trading has ceased. All open positions will be closed by the + // protocol. Open stateful orders will be cancelled. Open short-term + // orders will be left to expire. + ClobPair_STATUS_FINAL_SETTLEMENT ClobPair_Status = 6 ) var ClobPair_Status_name = map[int32]string{ @@ -52,15 +57,17 @@ var ClobPair_Status_name = map[int32]string{ 3: "STATUS_CANCEL_ONLY", 4: "STATUS_POST_ONLY", 5: "STATUS_INITIALIZING", + 6: "STATUS_FINAL_SETTLEMENT", } var ClobPair_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "STATUS_ACTIVE": 1, - "STATUS_PAUSED": 2, - "STATUS_CANCEL_ONLY": 3, - "STATUS_POST_ONLY": 4, - "STATUS_INITIALIZING": 5, + "STATUS_UNSPECIFIED": 0, + "STATUS_ACTIVE": 1, + "STATUS_PAUSED": 2, + "STATUS_CANCEL_ONLY": 3, + "STATUS_POST_ONLY": 4, + "STATUS_INITIALIZING": 5, + "STATUS_FINAL_SETTLEMENT": 6, } func (x ClobPair_Status) String() string { @@ -323,40 +330,41 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/clob_pair.proto", fileDescriptor_178b475635886947) } var fileDescriptor_178b475635886947 = []byte{ - // 521 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xd1, 0x6b, 0xd3, 0x40, - 0x1c, 0xc7, 0x93, 0xae, 0xab, 0xe3, 0xb6, 0xd6, 0xf4, 0x74, 0xae,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c, 0x97, 0x27, 0x10, 0x59, 0xbb, 0x47, 0x1d, 0xfd, 0xde, 0xac, 0xfa, 0xc6, 0x41, - 0x4f, 0x25, 0x77, 0x9f, 0x6e, 0xdc, 0x80, 0x07, 0x20, 0xa3, 0x84, 0xaf, 0xc5, 0x6f, 0x89, 0xf8, - 0xe7, 0x1b, 0xe2, 0xd7, 0x77, 0x71, 0x2a, 0xb9, 0x0a, 0x5b, 0xdf, 0xcf, 0x2b, 0x00, 0x19, 0xc7, - 0x34, 0x10, 0x4b, 0xba, 0xca, 0x51, 0xca, 0xf3, 0x31, 0x6b, 0x55, 0xdb, 0x72, 0xa7, 0xea, 0x2a, - 0x45, 0xa5, 0x87, 0x18, 0xfe, 0x5c, 0x72, 0xf8, 0x12, 0x34, 0x59, 0x1e, 0xf2, 0x24, 0xba, 0x64, - 0x01, 0xc5, 0x59, 0x50, 0xfc, 0xb5, 0xb6, 0xc5, 0x16, 0x1e, 0x2e, 0x0a, 0x0e, 0xce, 0xfc, 0x24, - 0xba, 0x84, 0xef, 0xc1, 0xb3, 0x32, 0x2f, 0x88, 0x48, 0x7a, 0x8d, 0x33, 0x96, 0x90, 0x34, 0xc0, - 0x13, 0x4a, 0x52, 0x9c, 0xf2, 0x56, 0xad, 0x2d, 0x77, 0x9a, 0xee, 0xd3, 0x52, 0x31, 0x97, 0x86, - 0x55, 0x0a, 0xf0, 0x18, 0xd4, 0x18, 0x47, 0x3c, 0x67, 0xad, 0x07, 0x6d, 0xb9, 0xd3, 0x38, 0xd2, - 0x36, 0x8c, 0xb8, 0xb8, 0x0f, 0xdd, 0x13, 0xa6, 0x5b, 0x76, 0x68, 0x3f, 0x64, 0x50, 0x9b, 0x23, - 0xf8, 0x04, 0x40, 0xcf, 0x37, 0xfc, 0xa1, 0x17, 0x0c, 0x07, 0x9e, 0x63, 0x99, 0xf6, 0x07, 0xdb, - 0x3a, 0x51, 0x24, 0xd8, 0x04, 0xf5, 0x92, 0x1b, 0xa6, 0x6f, 0x7f, 0xb1, 0x14, 0x79, 0x05, 0x39, - 0xc6, 0xd0, 0xb3, 0x4e, 0x94, 0xca, 0x4a, 0xb7, 0x69, 0x0c, 0x4c, 0xab, 0x1f, 0x9c, 0x0d, 0xfa, - 0x5f, 0x95, 0x2d, 0xf8, 0x18, 0x28, 0x0b, 0xf5, 0xcc, 0xf3, 0xe7, 0xb4, 0x0a, 0x0f, 0xc0, 0xa3, - 0x92, 0xda, 0x03, 0xdb, 0xb7, 0x8d, 0xbe, 0x7d, 0x6e, 0x0f, 0x3e, 0x2a, 0xdb, 0x3d, 0x00, 0x76, - 0x16, 0x17, 0xd6, 0x73, 0x7e, 0x4f, 0x55, 0xf9, 0x76, 0xaa, 0xca, 0x7f, 0xa7, 0xaa, 0xfc, 0x73, - 0xa6, 0x4a, 0xb7, 0x33, 0x55, 0xfa, 0x33, 0x53, 0xa5, 0xf3, 0x77, 0xdf, 0x13, 0x7e, 0x91, 0x87, - 0x7a, 0x44, 0xc6, 0xdd, 0x3b, 0x8f, 0xe7, 0xfa, 0xed, 0xeb, 0xe8, 0x02, 0x25, 0x69, 0x77, 0x49, - 0x26, 0xf3, 0x07, 0xc5, 0x6f, 0x28, 0x66, 0x61, 0x4d, 0xe0, 0x37, 0xff, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xc5, 0xb8, 0x66, 0x12, 0x72, 0x03, 0x00, 0x00, + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xc1, 0x6a, 0xdb, 0x30, + 0x1c, 0xc6, 0xed, 0x34, 0xcd, 0x8a, 0xda, 0x64, 0x8e, 0xb6, 0x2e, 0x19, 0x05, 0x93, 0x7a, 0x3b, + 0x84, 0xb1, 0x39, 0xd0, 0x8d, 0x1d, 0x7a, 0x18, 0x38, 0xae, 0xbb, 0x1a, 0x52, 0xd7, 0xb3, 0x9d, + 0xc1, 0xca, 0xc0, 0xc8,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f0, 0x4d, 0xda, 0x82, 0xcf, 0x81, 0xb4, 0xb0, 0x5e, 0xb8, 0xde, 0x9c, 0x56, 0x61, 0x0b, 0x3c, + 0x2b, 0xa9, 0x69, 0x99, 0x9e, 0xa9, 0x0d, 0xcc, 0x4b, 0xd3, 0xfa, 0x2c, 0x6d, 0xc3, 0x03, 0xd0, + 0x2a, 0x85, 0x53, 0xd3, 0xd2, 0x06, 0xbe, 0x6b, 0x78, 0xde, 0xc0, 0x38, 0x37, 0x2c, 0x4f, 0xaa, + 0xf5, 0x01, 0xd8, 0x59, 0xdc, 0x66, 0xdf, 0xfe, 0x3d, 0x95, 0xc5, 0xfb, 0xa9, 0x2c, 0xfe, 0x9d, + 0xca, 0xe2, 0xcf, 0x99, 0x2c, 0xdc, 0xcf, 0x64, 0xe1, 0xcf, 0x4c, 0x16, 0x2e, 0x3f, 0xfe, 0x88, + 0xd9, 0x55, 0x1e, 0xa8, 0x21, 0x19, 0xf7, 0x1e, 0xbc, 0xac, 0xdb, 0x0f, 0xef, 0xc2, 0x2b, 0x14, + 0x27, 0xbd, 0x25, 0x99, 0xcc, 0x5f, 0x1b, 0xbb, 0x4b, 0x31, 0x0d, 0x6a, 0x1c, 0xbf, 0xff, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x96, 0xa7, 0xc6, 0x50, 0x8f, 0x03, 0x00, 0x00, } func (m *PerpetualClobMetadata) Marshal() (dAtA []byte, err error) {