Documentation ¶
Index ¶
- Constants
- Variables
- func BigNegMaxUint64() *big.Int
- func FundingSamples_Constant_0_001_Percent_Length_60_With_Noises() (result []int32)
- func GenerateConstantFundingPremiums(value int32, count uint32) (result []int32)
- func GenerateEpochGenesisStateWithoutFunding() types.GenesisState
- func GenerateFundingSamplesWithValues(values []int32, counts []uint32) (result []int32)
- func GetPrivateKeyFromAddress(accAddress string) cryptotypes.PrivKey
Constants ¶
const ( // TestFee is the gas fee offered for test transactions. TestFee = "50000" + asstypes.UusdcDenom // 5 cents // TestFeeNativeTokens is the gas fee offered for test transactions specified in native tokens. // Value is .05 of native token in jinx denom. TestFeeNativeTokens = "50000000000000000" + lib.DefaultBaseDenom // TestGasLimit is the gas limit used for test transactions. // It's set to a larger amount such that the transaction never runs out of gas. TestGasLimit = 1_000_000 // TestNativeTokenDenom is the denom of the native token used for testing. TestNativeTokenDenom = "jinx" )
const ( AliceMnenomic = "merge panther lobster crazy road hollow amused security before critic about cliff exhibit " + "cause coyote talent happy where lion river tobacco option coconut small" BobMnenomic = "color habit donor nurse dinosaur stable wonder process post perfect raven gold census inside " + "worth inquiry mammal panic olive toss shadow strong name drum" CarlMnenomic = "school artefact ghost shop exchange slender letter debris dose window alarm hurt whale tiger " + "find found island what engine ketchup globe obtain glory manage" DaveMnenomic = "switch boring kiss cash lizard coconut romance hurry sniff bus accident zone chest height " + "merit elevator furnace eagle fetch quit toward steak mystery nest" )
const ( BtcUsdPair = "BTC-USD" EthUsdPair = "ETH-USD" MaticUsdPair = "MATIC-USD" SolUsdPair = "SOL-USD" LtcUsdPair = "LTC-USD" BtcUsdExponent = -5 EthUsdExponent = -6 LinkUsdExponent = -8 MaticUsdExponent = -9 CrvUsdExponent = -10 SolUsdExponent = -8 LtcUsdExponent = -7 CoinbaseExchangeName = "Coinbase" BinanceExchangeName = "Binance" BinanceUSExchangeName = "BinanceUS" BitfinexExchangeName = "Bitfinex" KrakenExchangeName = "Kraken" FiveBillion = uint64(5_000_000_000) ThreeBillion = uint64(3_000_000_000) FiveMillion = uint64(5_000_000) OneMillion = uint64(1_000_000) // Market param validation errors. ErrorMsgMarketPairCannotBeEmpty = "Pair cannot be empty" ErrorMsgInvalidMinPriceChange = "Min price change in parts-per-million must be greater than 0 and less than 10000" )
const GenesisState = `` /* 55908-byte string literal not displayed */
This is a copy of the localnet genesis.json. This can be retrieved from the localnet docker container path: /jinxprotocol/chain/.alice/config/genesis.json Disable linter for exchange config.
const TestFundingRateClampFactorPpm = 6_000_000
Perpetual genesis parameters.
const TestMinNumVotesPerSample = 15
const TestPremiumVoteClampFactorPpm = 60_000_000
Variables ¶
var ( AliceAccAddress = sdk.AccAddress(AlicePrivateKey.PubKey().Address()) BobAccAddress = sdk.AccAddress(BobPrivateKey.PubKey().Address()) CarlAccAddress = sdk.AccAddress(CarlPrivateKey.PubKey().Address()) DaveAccAddress = sdk.AccAddress(DavePrivateKey.PubKey().Address()) AliceValAddress = sdk.ValAddress(AlicePrivateKey.PubKey().Address()) BobValAddress = sdk.ValAddress(BobPrivateKey.PubKey().Address()) CarlValAddress = sdk.ValAddress(CarlPrivateKey.PubKey().Address()) DaveValAddress = sdk.ValAddress(DavePrivateKey.PubKey().Address()) AliceConsAddress = sdk.ConsAddress(AlicePrivateKey.PubKey().Address()) BobConsAddress = sdk.ConsAddress(BobPrivateKey.PubKey().Address()) CarlConsAddress = sdk.ConsAddress(CarlPrivateKey.PubKey().Address()) DaveConsAddress = sdk.ConsAddress(DavePrivateKey.PubKey().Address()) )
var ( // TestFeeCoins_5Cents is the gas fee offered for test transactions. TestFeeCoins_5Cents = lib.MustParseCoinsNormalized(TestFee) // TestFeeCoins_5Cents_NativeToken is the gas fee offered for test transactions specified in native tokens. TestFeeCoins_5Cents_NativeToken = lib.MustParseCoinsNormalized(TestFeeNativeTokens) )
var ( BtcUsd = &asstypes.Asset{ Id: 1, Symbol: "BTC", Denom: "btc-denom", DenomExponent: int32(-8), HasMarket: true, MarketId: uint32(0), AtomicResolution: int32(-8), } Usdc = &asstypes.Asset{ Id: 0, Symbol: "USDC", Denom: asstypes.AssetUsdc.Denom, DenomExponent: int32(-6), HasMarket: false, MarketId: uint32(0), AtomicResolution: int32(-6), } )
var ( // Bridge Event. BridgeEvent_Id0_Height0 = types.BridgeEvent{ Id: 0, Address: AliceAccAddress.String(), Coin: coin, EthBlockHeight: 0, } BridgeEvent_Id1_Height0 = types.BridgeEvent{ Id: 1, Address: BobAccAddress.String(), Coin: coin, EthBlockHeight: 0, } BridgeEvent_Id2_Height1 = types.BridgeEvent{ Id: 2, Address: BobAccAddress.String(), Coin: coin, EthBlockHeight: 1, } BridgeEvent_Id3_Height3 = types.BridgeEvent{ Id: 3, Address: CarlAccAddress.String(), Coin: coin, EthBlockHeight: 3, } BridgeEvent_Id4_Height0_EmptyCoin = types.BridgeEvent{ Id: 0, Address: AliceAccAddress.String(), Coin: emptyCoin, EthBlockHeight: 0, } BridgeEvent_Id55_Height15 = types.BridgeEvent{ Id: 55, Address: DaveAccAddress.String(), Coin: coin, EthBlockHeight: 15, } // Acknowledge Bridges Tx. MsgAcknowledgeBridges_NoEvents = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{}, } MsgAcknowledgeBridges_NoEvents_TxBytes []byte MsgAcknowledgeBridges_Id0_Height0 = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{ BridgeEvent_Id0_Height0, }, } MsgAcknowledgeBridges_Id0_Height0_TxBytes []byte MsgAcknowledgeBridges_Id1_Height0 = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{ BridgeEvent_Id1_Height0, }, } MsgAcknowledgeBridges_Id1_Height0_TxBytes []byte MsgAcknowledgeBridges_Id55_Height15 = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{ BridgeEvent_Id55_Height15, }, } MsgAcknowledgeBridges_Id55_Height15_TxBytes []byte MsgAcknowledgeBridges_Ids0_1_Height0 = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{ BridgeEvent_Id0_Height0, BridgeEvent_Id1_Height0, }, } MsgAcknowledgeBridges_Ids0_1_Height0_TxBytes []byte MsgAcknowledgeBridges_Ids0_55_Height0 = &types.MsgAcknowledgeBridges{ Events: []types.BridgeEvent{ BridgeEvent_Id0_Height0, BridgeEvent_Id55_Height15, }, } MsgAcknowledgeBridges_Ids0_55_Height0_TxBytes []byte // Event Info. AcknowledgedEventInfo_Id0_Height0 = types.BridgeEventInfo{ NextId: 0, EthBlockHeight: 0, } RecognizedEventInfo_Id2_Height0 = types.BridgeEventInfo{ NextId: 2, EthBlockHeight: 0, } // Eth Chain ID. EthChainId = 710 // Eth Log of Bridge event ID 0 at block height 3872013 that bridges 12345 tokens to address // `jinx1qqgzqvzq2ps8pqys5zcvp58q7rluextxzepsan`. EthLog_Event0 = ethcoretypes.Log{ Topics: []common.Hash{ common.HexToHash("0x498a04382650bc110983392ed12ab27595af8ece270a344fc70d773d2481043a"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), }, Data: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 213, 157, 76, 225, 209, 26, 78, 111, 27, 28, 56, 208, 105, 160, 45, 130, 224, 44, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255, 204, 153, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, BlockNumber: 3872013, } // Eth Log of Bridge event ID 1 at block height 3969937 that bridges 55 tokens to an empty address. EthLog_Event1 = ethcoretypes.Log{ Topics: []common.Hash{ common.HexToHash("0x498a04382650bc110983392ed12ab27595af8ece270a344fc70d773d2481043a"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"), }, Data: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 213, 157, 76, 225, 209, 26, 78, 111, 27, 28, 56, 208, 105, 160, 45, 130, 224, 44, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, BlockNumber: 3969937, } // Eth Log of Bridge event ID 2 at block height 4139345 that bridges 777 tokens to address // `jinx1qqgzqvzq2ps8pqys5zcvp58q7rluextxzy3rx3z4vemc3xgq42asksu05f` (32-byte address). EthLog_Event2 = ethcoretypes.Log{ Topics: []common.Hash{ common.HexToHash("0x498a04382650bc110983392ed12ab27595af8ece270a344fc70d773d2481043a"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002"), }, Data: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 213, 157, 76, 225, 209, 26, 78, 111, 27, 28, 56, 208, 105, 160, 45, 130, 224, 44, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255, 204, 153, 102, 17, 34, 51, 68, 85, 102, 119, 136, 153, 0, 170, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 18, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, BlockNumber: 4139345, } // Eth Log of Bridge event ID 3 at block height 4139348 that bridges 888 tokens to address // `jinx124n92ej4ve2kv4tx24n92ej4ve2kv4tx24n92ej4ve2kv4tx24nyggjyyfzzy3pzgs3yggjyyfzzy3pzgs3ygg // jyyfzzy3pzgs3q8699x3` (62-byte address). EthLog_Event3 = ethcoretypes.Log{ Topics: []common.Hash{ common.HexToHash("0x498a04382650bc110983392ed12ab27595af8ece270a344fc70d773d2481043a"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003"), }, Data: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 213, 157, 76, 225, 209, 26, 78, 111, 27, 28, 56, 208, 105, 160, 45, 130, 224, 44, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 85, 102, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 68, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, BlockNumber: 4139348, } // Eth Log of Bridge event ID 4 at block height 4139349 that bridges 1234123443214321 tokens to // address `jinx1zg6pydqhy4yy9`. EthLog_Event4 = ethcoretypes.Log{ Topics: []common.Hash{ common.HexToHash("0x498a04382650bc110983392ed12ab27595af8ece270a344fc70d773d2481043a"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004"), }, Data: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 98, 109, 193, 113, 23, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 213, 157, 76, 225, 209, 26, 78, 111, 27, 28, 56, 208, 105, 160, 45, 130, 224, 44, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 18, 52, 18, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 67, 33, 67, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, BlockNumber: 4139349, } // Params // Event Params. EventParams = types.EventParams{ Denom: coin.Denom, EthChainId: uint64(EthChainId), EthAddress: AliceAccAddress.String(), } // Propose Params. ProposeParams = types.ProposeParams{ MaxBridgesPerBlock: 2, ProposeDelayDuration: 1, SkipRatePpm: 0, SkipIfBlockDelayedByDuration: 1, } )
var ( ClobPair_Spot_Btc = clobtypes.ClobPair{ Id: 1000, Metadata: &clobtypes.ClobPair_SpotClobMetadata{ SpotClobMetadata: &clobtypes.SpotClobMetadata{ BaseAssetId: 0, QuoteAssetId: 0, }, }, StepBaseQuantums: 10, SubticksPerTick: 100, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Btc = clobtypes.ClobPair{ Id: 0, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 5, SubticksPerTick: 5, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Eth = clobtypes.ClobPair{ Id: 1, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 1, }, }, StepBaseQuantums: 1000, SubticksPerTick: 1000, QuantumConversionExponent: -9, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Eth_No_Fee = clobtypes.ClobPair{ Id: 1, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 1, }, }, StepBaseQuantums: 1000, SubticksPerTick: 1000, QuantumConversionExponent: -9, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Asset = clobtypes.ClobPair{ Id: 100, Metadata: &clobtypes.ClobPair_SpotClobMetadata{ SpotClobMetadata: &clobtypes.SpotClobMetadata{ BaseAssetId: 0, QuoteAssetId: 1, }, }, StepBaseQuantums: 1000, SubticksPerTick: 100, QuantumConversionExponent: 10, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Btc2 = clobtypes.ClobPair{ Id: 101, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 100, SubticksPerTick: 1000, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Btc3 = clobtypes.ClobPair{ Id: 0, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 10, SubticksPerTick: 100, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_ACTIVE, } ClobPair_Btc_Initializing = clobtypes.ClobPair{ Id: 0, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 5, SubticksPerTick: 5, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_INITIALIZING, } ClobPair_Btc_Final_Settlement = clobtypes.ClobPair{ Id: 0, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 5, SubticksPerTick: 5, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_FINAL_SETTLEMENT, } ClobPair_Btc_Paused = clobtypes.ClobPair{ Id: 0, Metadata: &clobtypes.ClobPair_PerpetualClobMetadata{ PerpetualClobMetadata: &clobtypes.PerpetualClobMetadata{ PerpetualId: 0, }, }, StepBaseQuantums: 5, SubticksPerTick: 5, QuantumConversionExponent: -8, Status: clobtypes.ClobPair_STATUS_PAUSED, } )
var ( // Collateralization check functions. CollatCheck_EmptyUpdateResults_Success = func( subaccountMatchedOrders map[satypes.SubaccountId][]clobtypes.PendingOpenOrder, ) ( success bool, successPerUpdate map[satypes.SubaccountId]satypes.UpdateResult, ) { return true, make(map[satypes.SubaccountId]satypes.UpdateResult) } CollatCheck_EmptyUpdateResults_Failure = func( subaccountMatchedOrders map[satypes.SubaccountId][]clobtypes.PendingOpenOrder, ) ( success bool, successPerUpdate map[satypes.SubaccountId]satypes.UpdateResult, ) { saMap := make(map[satypes.SubaccountId]satypes.UpdateResult) for a := range subaccountMatchedOrders { saMap[a] = satypes.NewlyUndercollateralized } return false, saMap } )
var ( // MsgCompleteBridge is an example of an expected Msg type in the delaymsg module. TestMsg1 = &bridgetypes.MsgCompleteBridge{ Authority: types.ModuleAddress.String(), Event: bridgetypes.BridgeEvent{ Id: 1, }, } TestMsg2 = &bridgetypes.MsgCompleteBridge{ Authority: types.ModuleAddress.String(), Event: bridgetypes.BridgeEvent{ Id: 2, }, } TestMsg3 = &bridgetypes.MsgCompleteBridge{ Authority: types.ModuleAddress.String(), Event: bridgetypes.BridgeEvent{ Id: 3, }, } NoHandlerMsg = &testdata.TestMsg{Signers: []string{"invalid - no module handles this message"}} AllMsgs = []sdk.Msg{TestMsg1, TestMsg2, TestMsg3} )
var ( TestEncodingCfg = encoding.GetTestEncodingCfg() TestTxBuilder = TestEncodingCfg.TxConfig.NewTxBuilder() )
var ( // Order hashes. OrderHash_Empty = [32]byte{ 0x06, 0xd9, 0x36, 0x73, 0x41, 0x3b, 0xa3, 0x29, 0x4a, 0xbc, 0x0e, 0x33, 0x97, 0x38, 0x1a, 0x44, 0x15, 0xed, 0x37, 0x9c, 0xe6, 0x21, 0xfe, 0x91, 0x6b, 0xaf, 0xf7, 0x45, 0x98, 0x3d, 0x1b, 0x8c, } OrderHash_Alice_Number0_Id0 = [32]uint8{ 0xa7, 0xff, 0x56, 0x78, 0xfc, 0x54, 0xff, 0x3b, 0x9f, 0x4a, 0x71, 0xa2, 0xc4, 0x14, 0x97, 0x18, 0xac, 0x4b, 0xf6, 0x53, 0x67, 0x9f, 0xff, 0xb8, 0xe0, 0xf8, 0x47, 0xaf, 0x36, 0xdb, 0x35, 0x5d, } // Liquidation order hashes. LiquidationOrderHash_Empty = [32]byte{ 0x10, 0x2b, 0x51, 0xb9, 0x76, 0x5a, 0x56, 0xa3, 0xe8, 0x99, 0xf7, 0xcf, 0x0e, 0xe3, 0x8e, 0x52, 0x51, 0xf9, 0xc5, 0x03, 0xb3, 0x57, 0xb3, 0x30, 0xa4, 0x91, 0x83, 0xeb, 0x7b, 0x15, 0x56, 0x04, } LiquidationOrderHash_Alice_Number0_Perpetual0 = [32]byte{ 0x5c, 0x2e, 0xc7, 0xcb, 0xfc, 0xf2, 0x63, 0xf6, 0xcb, 0x37, 0x44, 0x12, 0x60, 0xcc, 0x8b, 0x71, 0xdd, 0x28, 0xb7, 0xfc, 0x8f, 0x00, 0xff, 0x00, 0xc1, 0x39, 0x16, 0x45, 0xce, 0x53, 0x21, 0x95, } LiquidationOrderHash_Alice_Number0_Perpetual1 = [32]byte{ 0x9c, 0xa7, 0xb0, 0x89, 0x2e, 0x52, 0x4a, 0xe1, 0x87, 0x94, 0x14, 0xdb, 0xeb, 0x82, 0x76, 0xa2, 0xf3, 0xe3, 0xae, 0xa1, 0x12, 0xa8, 0xc4, 0x1e, 0x1f, 0xd7, 0xd7, 0x3c, 0x97, 0xc9, 0xbd, 0xf3, } LiquidationOrderHash_Alice_Number1_Perpetual0 = [32]byte{ 0x13, 0x47, 0xda, 0xb1, 0x2b, 0x8a, 0x4e, 0x9a, 0x46, 0xf2, 0xd2, 0xaa, 0x94, 0x51, 0x4b, 0xe8, 0xd1, 0xf9, 0xbf, 0xad, 0x89, 0xf2, 0xdf, 0x4c, 0x49, 0xaa, 0x2f, 0xca, 0x8b, 0x32, 0x65, 0xf3, } // OrderId hashes OrderIdHash_Empty = []byte{ 0x10, 0x2b, 0x51, 0xb9, 0x76, 0x5a, 0x56, 0xa3, 0xe8, 0x99, 0xf7, 0xcf, 0x0e, 0xe3, 0x8e, 0x52, 0x51, 0xf9, 0xc5, 0x03, 0xb3, 0x57, 0xb3, 0x30, 0xa4, 0x91, 0x83, 0xeb, 0x7b, 0x15, 0x56, 0x04, } OrderIdHash_Alice_Number0_Id0 = []byte{ 0x5c, 0x2e, 0xc7, 0xcb, 0xfc, 0xf2, 0x63, 0xf6, 0xcb, 0x37, 0x44, 0x12, 0x60, 0xcc, 0x8b, 0x71, 0xdd, 0x28, 0xb7, 0xfc, 0x8f, 0x00, 0xff, 0x00, 0xc1, 0x39, 0x16, 0x45, 0xce, 0x53, 0x21, 0x95, } )
SHA256 hashes.
var ( TestTxBytes = []byte{0x1, 0x2, 0x3} TestTxHashBytes = tmhash.Sum(TestTxBytes) TestTxHashString = lib.TxHash(fmt.Sprintf("%X", TestTxHashBytes)) TestTxHashHeader = msgsender.MessageHeader{ Key: msgsender.TransactionHashHeaderKey, Value: TestTxHashBytes, } TestTxBytes1 = []byte{0x4, 0x5, 0x6} TestTxHashBytes1 = tmhash.Sum(TestTxBytes1) TestTxHashString1 = lib.TxHash(fmt.Sprintf("%X", TestTxHashBytes1)) TestOffchainUpdates = &clobtypes.OffchainUpdates{ Messages: []clobtypes.OffchainUpdateMessage{ {Type: clobtypes.PlaceMessageType, OrderId: testOrderId, Message: testMessage}, {Type: clobtypes.UpdateMessageType, OrderId: testOrderId, Message: testMessage}, {Type: clobtypes.RemoveMessageType, OrderId: testOrderId, Message: testMessage}, }, } TestOffchainMessages = TestOffchainUpdates.GetMessages() )
var ( // Block limits. FillablePriceConfig_Default = clobtypes.FillablePriceConfig{ BankruptcyAdjustmentPpm: lib.OneMillion, SpreadToMaintenanceMarginRatioPpm: 100_000, } FillablePriceConfig_Max_Smmr = clobtypes.FillablePriceConfig{ BankruptcyAdjustmentPpm: lib.OneMillion, SpreadToMaintenanceMarginRatioPpm: lib.OneMillion, } PositionBlockLimits_Default = clobtypes.PositionBlockLimits{ MinPositionNotionalLiquidated: 1_000, MaxPositionPortionLiquidatedPpm: 1_000_000, } SubaccountBlockLimits_Default = clobtypes.SubaccountBlockLimits{ MaxNotionalLiquidated: 100_000_000_000_000, MaxQuantumsInsuranceLost: 100_000_000_000_000, } PositionBlockLimits_No_Limit = clobtypes.PositionBlockLimits{ MinPositionNotionalLiquidated: 1, MaxPositionPortionLiquidatedPpm: lib.OneMillion, } SubaccountBlockLimits_No_Limit = clobtypes.SubaccountBlockLimits{ MaxNotionalLiquidated: math.MaxUint64, MaxQuantumsInsuranceLost: math.MaxUint64, } // Liquidation Configs. LiquidationsConfig_No_Limit = clobtypes.LiquidationsConfig{ MaxLiquidationFeePpm: 5_000, FillablePriceConfig: FillablePriceConfig_Default, PositionBlockLimits: PositionBlockLimits_No_Limit, SubaccountBlockLimits: SubaccountBlockLimits_No_Limit, } LiquidationsConfig_FillablePrice_Max_Smmr = clobtypes.LiquidationsConfig{ MaxLiquidationFeePpm: 5_000, FillablePriceConfig: FillablePriceConfig_Max_Smmr, PositionBlockLimits: PositionBlockLimits_No_Limit, SubaccountBlockLimits: SubaccountBlockLimits_No_Limit, } LiquidationsConfig_Position_Min10m_Max05mPpm = clobtypes.LiquidationsConfig{ MaxLiquidationFeePpm: 5_000, FillablePriceConfig: FillablePriceConfig_Default, PositionBlockLimits: clobtypes.PositionBlockLimits{ MinPositionNotionalLiquidated: 10_000_000, MaxPositionPortionLiquidatedPpm: 500_000, }, SubaccountBlockLimits: SubaccountBlockLimits_No_Limit, } LiquidationsConfig_Subaccount_Max10bNotionalLiquidated_Max10bInsuranceLost = clobtypes.LiquidationsConfig{ MaxLiquidationFeePpm: 5_000, FillablePriceConfig: FillablePriceConfig_Default, PositionBlockLimits: PositionBlockLimits_No_Limit, SubaccountBlockLimits: clobtypes.SubaccountBlockLimits{ MaxNotionalLiquidated: 10_000_000_000, MaxQuantumsInsuranceLost: 10_000_000_000, }, } )
var ( // Liquidation Orders. LiquidationOrder_Carl_Num0_Clob0_Buy3_Price50_BTC = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 3, 50, ) LiquidationOrder_Bob_Num0_Clob0_Buy100_Price20_BTC = *clobtypes.NewLiquidationOrder( Bob_Num0, ClobPair_Btc, true, 100, 20, ) LiquidationOrder_Bob_Num0_Clob0_Buy25_Price30_BTC = *clobtypes.NewLiquidationOrder( Bob_Num0, ClobPair_Btc, true, 25, 30, ) LiquidationOrder_Alice_Num0_Clob0_Sell20_Price25_BTC = *clobtypes.NewLiquidationOrder( Alice_Num0, ClobPair_Btc, false, 20, 25, ) LiquidationOrder_Bob_Num0_Clob1_Sell70_Price10_ETH = *clobtypes.NewLiquidationOrder( Bob_Num0, ClobPair_Eth, false, 70, 10, ) LiquidationOrder_Carl_Num0_Clob0_Buy100BTC_Price101 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 10_000_000_000, 101_000_000, ) LiquidationOrder_Carl_Num0_Clob0_Buy01BTC_Price50000 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 10_000_000, 50_000_000_000, ) LiquidationOrder_Carl_Num0_Clob0_Buy1BTC_Price50000 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 100_000_000, 50_000_000_000, ) LiquidationOrder_Carl_Num0_Clob0_Buy1BTC_Price50500 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 100_000_000, 50_500_000_000, ) LiquidationOrder_Carl_Num0_Clob0_Buy1BTC_Price50501_01 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 100_000_000, 50_501_010_000, ) LiquidationOrder_Carl_Num0_Clob0_Buy1BTC_Price60000 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Btc, true, 100_000_000, 60_000_000_000, ) LiquidationOrder_Carl_Num0_Clob1_Buy1ETH_Price3000 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Eth, true, 1_000_000_000, 3_000_000_000, ) LiquidationOrder_Carl_Num0_Clob1_Buy1ETH_Price3030 = *clobtypes.NewLiquidationOrder( Carl_Num0, ClobPair_Eth, true, 1_000_000_000, 3_030_000_000, ) LiquidationOrder_Dave_Num0_Clob0_Buy100BTC_Price102 = *clobtypes.NewLiquidationOrder( Dave_Num0, ClobPair_Btc, true, 10_000_000_000, 102_000_000, ) LiquidationOrder_Dave_Num0_Clob0_Sell100BTC_Price98 = *clobtypes.NewLiquidationOrder( Dave_Num0, ClobPair_Btc, false, 10_000_000_000, 98_000_000, ) LiquidationOrder_Dave_Num0_Clob0_Sell1BTC_Price49500 = *clobtypes.NewLiquidationOrder( Dave_Num0, ClobPair_Btc, false, 100_000_000, 49_500_000_000, ) LiquidationOrder_Dave_Num0_Clob0_Sell1BTC_Price50000 = *clobtypes.NewLiquidationOrder( Dave_Num0, ClobPair_Btc, false, 100_000_000, 50_000_000_000, ) LiquidationOrder_Dave_Num1_Clob0_Buy100BTC_Price101 = *clobtypes.NewLiquidationOrder( Dave_Num1, ClobPair_Btc, true, 10_000_000_000, 101_000_000, ) LiquidationOrder_Dave_Num1_Clob0_Buy100BTC_Price102 = *clobtypes.NewLiquidationOrder( Dave_Num1, ClobPair_Btc, true, 10_000_000_000, 102_000_000, ) LiquidationOrder_Dave_Num1_Clob0_Sell01BTC_Price50000 = *clobtypes.NewLiquidationOrder( Dave_Num1, ClobPair_Btc, false, 10_000_000, 50_000_000_000, ) )
var ( Msg_CancelOrder = &clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ ClientId: 0, SubaccountId: Alice_Num0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 10}, } Msg_CancelOrder_TxBtyes []byte Msg_CancelOrder_LongTerm = &clobtypes.MsgCancelOrder{ OrderId: LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15.GetOrderId(), GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 20}, } Msg_CancelOrder_Conditional = &clobtypes.MsgCancelOrder{ OrderId: ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_StopLoss20.GetOrderId(), GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 20}, } Msg_PlaceOrder = &clobtypes.MsgPlaceOrder{ Order: Order_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB15, } Msg_PlaceOrder_TxBtyes []byte Msg_PlaceOrder_LongTerm = &clobtypes.MsgPlaceOrder{ Order: LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15, } Msg_PlaceOrder_Conditional = &clobtypes.MsgPlaceOrder{ Order: ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_StopLoss20, } Msg_Transfer = &sendingtypes.MsgCreateTransfer{ Transfer: &sendingtypes.Transfer{ Sender: Carl_Num0, Recipient: Dave_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 500_000_000, }, } Msg_Send = &banktypes.MsgSend{ FromAddress: AliceAccAddress.String(), ToAddress: BobAccAddress.String(), Amount: sdk.Coins{sdk.Coin{ Denom: "foo", Amount: sdkmath.OneInt(), }}, } Msg_Send_TxBytes []byte Msg_Send_Invalid_Zero_Amount = &banktypes.MsgSend{ FromAddress: AliceAccAddress.String(), ToAddress: BobAccAddress.String(), Amount: sdk.Coins{sdk.Coin{ Denom: "foo", Amount: sdkmath.Int{}, }}, } Msg_Send_Invalid_Zero_Amount_TxBytes []byte Msg_SendAndTransfer_TxBytes []byte )
var ( ValidEmptyMsgProposedOperations = &types.MsgProposedOperations{} ValidEmptyMsgProposedOperationsTxBytes []byte // InvalidProposedOperationsUnspecifiedOrderRemovalReason is invalid because the order removal reason is // unspecified. InvalidProposedOperationsUnspecifiedOrderRemovalReason = &types.MsgProposedOperations{ OperationsQueue: []types.OperationRaw{ { Operation: &types.OperationRaw_OrderRemoval{ OrderRemoval: &types.OrderRemoval{ OrderId: LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15.OrderId, RemovalReason: types.OrderRemoval_REMOVAL_REASON_UNSPECIFIED, }, }, }, }, } InvalidProposedOperationsUnspecifiedOrderRemovalReasonTxBytes []byte )
var ( CancelOrder_Alice_Num0_Id12_Clob0_GTB5 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 12, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 5}, } CancelOrder_Alice_Num1_Id13_Clob0_GTB25 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 13, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 25}, } CancelOrder_Alice_Num1_Id13_Clob0_GTB30 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 13, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 30}, } CancelOrder_Alice_Num1_Id13_Clob0_GTB35 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 13, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 35}, } CancelOrder_Bob_Num0_Id2_Clob1_GTB5 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 1, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 5}, } CancelOrder_Alice_Num0_Id10_Clob0_GTB20 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 10, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 20}, } CancelOrder_Alice_Num1_Id11_Clob1_GTB20 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 11, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 1, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 20}, } CancelOrder_Bob_Num1_Id11_Clob1_GTB20 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num1, ClientId: 11, OrderFlags: clobtypes.OrderIdFlags_ShortTerm, ClobPairId: 1, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlock{GoodTilBlock: 20}, } // Long Term Order Cancellations CancelLongTermOrder_Alice_Num1_Id1_Clob0_GTBT_20 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 25}, } CancelLongTermOrder_Alice_Num0_Id0_Clob0_GTBT5 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 5}, } CancelLongTermOrder_Alice_Num0_Id0_Clob0_GTBT15 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 15}, } CancelLongTermOrder_Bob_Num0_Id0_Clob0_GTBT5 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 5}, } // Conditional Order Cancellations CancelConditionalOrder_Alice_Num1_Id0_Clob0_GTBT15 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 15}, } CancelConditionalOrder_Alice_Num1_Id0_Clob1_GTBT15 = clobtypes.MsgCancelOrder{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, GoodTilOneof: &clobtypes.MsgCancelOrder_GoodTilBlockTime{GoodTilBlockTime: 15}, } )
var ( OrderId_Alice_Num0_ClientId0_Clob0 = clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0} OrderId_Alice_Num0_ClientId1_Clob0 = clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 0} OrderId_Alice_Num0_ClientId2_Clob0 = clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 2, ClobPairId: 0} OrderId_Bob_Num0_ClientId0_Clob0 = clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 0, ClobPairId: 0} LongTermOrderId_Alice_Num0_ClientId0_Clob0 = clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, } LongTermOrderId_Alice_Num1_ClientId3_Clob1 = clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 3, ClobPairId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, } // Invalid clobPairId InvalidClobPairId_Long_Term_Order = clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 99999, } // Invalid order ids InvalidSubaccountIdOwner_OrderId = clobtypes.OrderId{ SubaccountId: InvalidSubaccountIdOwner, ClientId: 0, ClobPairId: 0, } InvalidSubaccountIdNumber_OrderId = clobtypes.OrderId{ SubaccountId: InvalidSubaccountIdNumber, ClientId: 0, ClobPairId: 0, } )
var ( // Short-term orders. Order_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id0_Clob0_Buy10_Price10_GTB16 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 16}, } Order_Alice_Num0_Id0_Clob1_Buy5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id0_Clob2_Buy5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 2}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Sell5_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Buy5_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Buy6_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 6, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Buy35_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 35, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id1_Clob0_Sell5_Price15_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id1_Clob0_Sell10_Price15_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id2_Clob1_Sell5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 2, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id3_Clob1_Sell5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Alice_Num0_Id4_Clob1_Buy25_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id4_Clob2_Buy25_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 4, ClobPairId: 2}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id5_Clob1_Sell25_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 5, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id6_Clob0_Buy25_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 6, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id7_Clob0_Sell25_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 7, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id8_Clob1_Sell25_PriceMax_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 8, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: math.MaxUint64, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id9_Clob1_Buy15_Price45_GTB19 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 9, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 45, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 19}, } Order_Alice_Num0_Id10_Clob0_Sell25_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id10_Clob0_Sell35_Price15_GTB25 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 35, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 25}, } Order_Alice_Num0_Id0_Clob0_Sell200BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Sell100BTC_Price102_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000_000, Subticks: 102_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num0_Id0_Clob0_Sell100BTC_Price106_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000_000, Subticks: 106_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id0_Clob0_Sell10_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id0_Clob0_Sell10_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id2_Clob1_Buy67_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 2, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 67, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id3_Clob1_Buy7_Price5 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 7, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Clob0_Id4_Buy10_Price45_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 4, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 45, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id5_Clob1_Sell50_Price40_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 5, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id6_Clob1_Sell15_Price22_GTB30 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 6, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 15, Subticks: 22, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, } Order_Alice_Num1_Id7_Clob1_Buy35_PriceMax_GTB30 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 7, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 35, Subticks: math.MaxUint64, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, } Order_Alice_Num1_Id8_Clob0_Buy15_Price25_GTB31 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 8, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 25, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 31}, } Order_Alice_Num1_Id9_Clob0_Sell10_Price10_GTB31 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 9, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 31}, } Order_Alice_Num1_Id10_Clob0_Buy5_Price30_GTB31 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 31}, } Order_Alice_Num1_Id10_Clob0_Buy5_Price30_GTB32 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 32}, } Order_Alice_Num1_Id10_Clob0_Buy6_Price30_GTB32 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 6, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 32}, } Order_Alice_Num1_Id10_Clob0_Buy7_Price30_GTB33 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 7, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 33}, } Order_Alice_Num1_Id10_Clob0_Buy10_Price30_GTB33 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 33}, } Order_Alice_Num1_Id10_Clob0_Buy15_Price30_GTB33 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 33}, } Order_Alice_Num1_Id10_Clob0_Buy10_Price30_GTB34 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 34}, } Order_Alice_Num1_Id10_Clob0_Buy5_Price30_GTB34 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 34}, } Order_Alice_Num1_Id11_Clob1_Buy10_Price45_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 11, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 45, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Alice_Num1_Id12_Clob0_Sell20_Price5_GTB25 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 25}, } Order_Alice_Num1_Id13_Clob0_Buy30_Price50_GTB25 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 13, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 30, Subticks: 50, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 25}, } Order_Alice_Num1_Id13_Clob0_Buy50_Price50_GTB30 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 13, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 50, Subticks: 50, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, } Order_Bob_Num0_Id0_Clob1_Sell10_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 0, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id0_Clob2_Sell10_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 0, ClobPairId: 2}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id1_Clob1_Sell11_Price16_GTB18 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 11, Subticks: 16, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 18}, } Order_Bob_Num0_Id1_Clob1_Sell11_Price16_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 11, Subticks: 16, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id2_Clob1_Sell12_Price13_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 2, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 12, Subticks: 13, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id3_Clob1_Buy10_Price10_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id4_Clob1_Buy20_Price35_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id5_Clob0_Buy20_Price10_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 5, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id6_Clob0_Buy20_Price1000_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 6, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 1000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id7_Clob0_Buy20_Price10000_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 7, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 10000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id8_Clob1_Sell5_Price10_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 8, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id8_Clob1_Sell20_Price10_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 8, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id8_Clob0_Sell20_Price10_GTB22 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 8, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id9_Clob0_Sell20_Price1000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 9, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 1000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id10_Clob0_Sell20_Price10000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 10, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, } Order_Bob_Num0_Id11_Clob1_Sell5_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 11, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id11_Clob1_Buy5_Price40_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 11, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id12_Clob0_Buy5_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id12_Clob0_Buy5_Price40_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id12_Clob1_Buy5_Price40_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id11_Clob1_Buy5_Price40_GTB32 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 11, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 32}, } Order_Bob_Num0_Id12_Clob0_Sell20_Price5_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id12_Clob0_Sell20_Price15_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id12_Clob0_Sell20_Price35_GTB32 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 12, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 32}, } Order_Bob_Num0_Id13_Clob0_Sell35_Price35_GTB30 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 13, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 35, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, } Order_Bob_Num0_Id14_Clob0_Sell10_Price10_GTB25 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 14, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 25}, } Order_Bob_Num0_Id1_Clob0_Buy35_Price55_GTB32 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 35, Subticks: 55, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 32}, } Order_Bob_Num0_Id2_Clob0_Sell25_Price95_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 95, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Bob_Num0_Id1_Clob0_Buy100BTC_Price98_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 98_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id1_Clob0_Buy100BTC_Price99_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 99_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id0_Clob0_Sell100BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num0_Id0_Clob0_Sell200BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Bob_Num1_Id1_Clob1_Sell25_Price85_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 85, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price5subticks_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Sell1BTC_Price5000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 5_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price500000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 500_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Sell1BTC_Price500000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 500_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id2_Clob0_Sell5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } Order_Carl_Num0_Id1_Clob0_Buy01BTC_Price49500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000, Subticks: 49_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price49500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 49_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price49800_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 49_800_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price50000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id2_Clob0_Buy1BTC_Price50500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id1_Clob0_Buy1BTC_Price49999 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 49_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id2_Clob0_Buy05BTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id3_Clob0_Buy025BTC_Price49500 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 3, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25_000_000, Subticks: 49_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id3_Clob0_Buy025BTC_Price49800 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 3, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25_000_000, Subticks: 49_800_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id3_Clob0_Buy025BTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 3, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id4_Clob0_Buy05BTC_Price40000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 4, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 40_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id5_Clob0_Buy2BTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 5, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 200_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id2_Clob1_Buy10ETH_Price3000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 2, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 3_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id3_Clob1_Buy1ETH_Price3000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 1_000_000_000, Subticks: 3_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id4_Clob1_Buy01ETH_Price3000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 3_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy10QtBTC_Price100000QuoteQt = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 100_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Carl_Num0_Id0_Clob0_Buy10QtBTC_Price100001QuoteQt = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 100_001_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Carl_Num0_Id0_Clob0_Sell1kQtBTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id1_Clob0_Sell1kQtBTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num0_Id0_Clob0_Buy100BTC_Price99_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 99_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Carl_Num0_Id1_Clob0_Buy100BTC_Price100_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 100_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Carl_Num0_Id1_Clob0_Buy100BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Carl_Num1_Id0_Clob0_Buy1kQtBTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 1_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num1_Id0_Clob0_Buy1kQtBTC_Price60000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 1_000_000, Subticks: 60_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num1_Id1_Clob0_Buy1kQtBTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num1, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 1_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num1_Id0_Clob0_Buy1BTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num1, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 49_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Carl_Num1_Id0_Clob0_Buy1BTC_Price50000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id2_Clob0_Sell1BTC_Price49500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 49_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price49999_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 49_999_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50498_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_498_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id1_Clob0_Sell01BTC_Price50500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000, Subticks: 50_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50500_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price60000_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 60_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id1_Clob0_Sell025BTC_Price50000_GTB11 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 11}, } Order_Dave_Num0_Id1_Clob0_Sell025BTC_Price50498_GTB11 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_498_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 11}, } Order_Dave_Num0_Id1_Clob0_Sell025BTC_Price50500_GTB11 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 11}, } // Replacement for the above order Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id1_Clob0_Sell025BTC_Price50000_GTB12 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 12}, } Order_Dave_Num0_Id2_Clob0_Sell025BTC_Price50000_GTB12 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 12}, } Order_Dave_Num0_Id2_Clob0_Sell025BTC_Price50500_GTB12 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 12}, } Order_Dave_Num0_Id0_Clob0_Buy100BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Dave_Num0_Id0_Clob0_Buy100BTC_Price102_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 102_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Dave_Num0_Id1_Clob0_Buy100BTC_Price104_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 104_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Dave_Num0_Id3_Clob1_Sell1ETH_Price3000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000_000, Subticks: 3_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id4_Clob1_Sell1ETH_Price3000 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000_000, Subticks: 3_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id4_Clob1_Sell1ETH_Price3020 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000_000, Subticks: 3_020_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num0_Id4_Clob1_Sell1ETH_Price3030 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 1_000_000_000, Subticks: 3_030_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num1_Id0_Clob0_Sell025BTC_Price49999_GTB10 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 49_999_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, } Order_Dave_Num1_Id0_Clob0_Buy100BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Dave_Num1_Id0_Clob0_Sell100BTC_Price101_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000_000, Subticks: 101_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } Order_Dave_Num1_Id0_Clob0_Sell100BTC_Price102_GTB20 = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num1, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10_000_000_000, Subticks: 102_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, } // IOC orders. Order_Alice_Num0_Id1_Clob1_Buy5_Price15_GTB20_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } Order_Alice_Num0_Id1_Clob1_Sell5_Price15_GTB20_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } Order_Alice_Num0_Id1_Clob1_Buy10_Price15_GTB20_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } Order_Alice_Num0_Id1_Clob1_Sell10_Price15_GTB20_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB20_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB21_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 21}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } // Fill-or-kill orders. Order_Alice_Num0_Id0_Clob1_Sell10_Price15_GTB20_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Alice_Num0_Id0_Clob1_Buy10_Price15_GTB20_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Alice_Num0_Id0_Clob1_Buy20_Price15_GTB20_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 0, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB20_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB21_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 21}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Bob_Num0_Id1_Clob1_Buy20_Price35_GTB22_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Carl_Num0_Id0_Clob0_Buy05BTC_Price50000_GTB10_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price50000_GTB10_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Carl_Num0_Id0_Clob0_Buy075BTC_Price50000_GTB11_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 75_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 11}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTB10_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } // FOK + RO orders. Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB20_FOK_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, ReduceOnly: true, } // Reduce-only orders. Order_Alice_Num1_Id1_Clob0_Sell10_Price15_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Alice_Num1_Id2_Clob0_Buy20_Price30_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Alice_Num1_Id3_Clob1_Buy30_Price35_GTB25_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 3, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 30, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 25}, ReduceOnly: true, } Order_Alice_Num1_Id4_Clob0_Sell15_Price20_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 4, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 15, Subticks: 20, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Alice_Num1_Id5_Clob1_Sell10_Price15_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 5, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Alice_Num1_Id6_Clob0_Buy10_Price5_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 6, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Bob_Num0_Id1_Clob0_Sell15_Price50_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 15, Subticks: 50, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Bob_Num0_Id2_Clob0_Sell10_Price35_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Bob_Num0_Id3_Clob0_Sell20_Price10_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 3, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } Order_Carl_Num0_Id0_Clob0_Buy1BTC_Price50000_GTB10_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Carl_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, ReduceOnly: true, } Order_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTB10_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 10}, ReduceOnly: true, } Order_Dave_Num0_Id2_Clob0_Sell25BTC_Price50000_GTB12_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 2, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 12}, ReduceOnly: true, } // Post-only orders. Order_Alice_Num0_Id1_Clob0_Sell15_Price10_GTB18_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_SELL, Quantums: 15, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 18}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } Order_Alice_Num0_Id1_Clob0_Buy15_Price10_GTB18_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num0, ClientId: 1, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 18}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } Order_Alice_Num1_Id1_Clob1_Sell10_Price15_GTB20_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Alice_Num1, ClientId: 1, ClobPairId: 1}, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } Order_Bob_Num0_Id4_Clob1_Buy20_Price35_GTB22_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: Bob_Num0, ClientId: 4, ClobPairId: 1}, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 22}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } )
var ( BtcUsd_InvalidMarketId = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD invalid market Id", MarketId: uint32(9999), AtomicResolution: int32(-10), DefaultFundingPpm: int32(0), LiquidityTier: uint32(0), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_0DefaultFunding_0AtomicResolution = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 0 percent default funding, 0 atomic resolution", MarketId: uint32(0), AtomicResolution: int32(0), DefaultFundingPpm: int32(0), LiquidityTier: uint32(2), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_NegativeDefaultFunding_10AtomicResolution = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD -0.001 percent percent default funding", MarketId: uint32(0), AtomicResolution: int32(-10), DefaultFundingPpm: int32(-1_000), LiquidityTier: uint32(1), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_0DefaultFunding_10AtomicResolution = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 0 percent default funding", MarketId: uint32(0), AtomicResolution: int32(-10), DefaultFundingPpm: int32(0), LiquidityTier: uint32(1), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_0DefaultFunding_10AtomicResolution_20IM_18MM = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 0 percent default funding, 20% IM, 18% MM", MarketId: uint32(0), AtomicResolution: int32(-10), DefaultFundingPpm: int32(0), LiquidityTier: uint32(6), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_0_001Percent_DefaultFunding_10AtomicResolution = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 10000, Ticker: "BTC-USD 0.001 percent default funding", MarketId: uint32(0), AtomicResolution: int32(-10), DefaultFundingPpm: int32(1000), LiquidityTier: uint32(1), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_SmallMarginRequirement = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD small margin requirement", MarketId: uint32(0), AtomicResolution: int32(-8), DefaultFundingPpm: int32(0), LiquidityTier: uint32(8), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_100PercentMarginRequirement = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 100% margin requirement", MarketId: uint32(0), AtomicResolution: int32(-8), DefaultFundingPpm: int32(0), LiquidityTier: uint32(0), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_50PercentInitial_40PercentMaintenance = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 50/40 margin requirements", MarketId: uint32(0), AtomicResolution: int32(-8), DefaultFundingPpm: int32(0), LiquidityTier: uint32(4), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_20PercentInitial_10PercentMaintenance = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD 20/10 margin requirements", MarketId: uint32(0), AtomicResolution: int32(-8), DefaultFundingPpm: int32(0), LiquidityTier: uint32(3), }, FundingIndex: dtypes.ZeroInt(), } BtcUsd_NoMarginRequirement = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 0, Ticker: "BTC-USD no margin requirement", MarketId: uint32(0), AtomicResolution: int32(-8), DefaultFundingPpm: int32(0), LiquidityTier: uint32(7), }, FundingIndex: dtypes.ZeroInt(), } EthUsd_0DefaultFunding_9AtomicResolution = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 1, Ticker: "ETH-USD default fundingm, -9 atomic resolution", MarketId: uint32(1), AtomicResolution: int32(-9), DefaultFundingPpm: int32(0), LiquidityTier: uint32(5), }, FundingIndex: dtypes.ZeroInt(), } EthUsd_NoMarginRequirement = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 1, Ticker: "ETH-USD no margin requirement", MarketId: uint32(1), AtomicResolution: int32(-9), DefaultFundingPpm: int32(0), LiquidityTier: uint32(7), }, FundingIndex: dtypes.ZeroInt(), } EthUsd_20PercentInitial_10PercentMaintenance = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 1, Ticker: "ETH-USD 20/10 margin requirements", MarketId: uint32(1), AtomicResolution: int32(-9), DefaultFundingPpm: int32(0), LiquidityTier: uint32(3), }, FundingIndex: dtypes.ZeroInt(), } EthUsd_100PercentMarginRequirement = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 1, Ticker: "ETH-USD 100/100 margin requirements", MarketId: uint32(1), AtomicResolution: int32(-9), DefaultFundingPpm: int32(0), LiquidityTier: uint32(0), }, FundingIndex: dtypes.ZeroInt(), } SolUsd_20PercentInitial_10PercentMaintenance = perptypes.Perpetual{ Params: perptypes.PerpetualParams{ Id: 2, Ticker: "SOL-USD 20/10 margin requirements", MarketId: uint32(2), AtomicResolution: int32(-9), DefaultFundingPpm: int32(0), LiquidityTier: uint32(3), }, FundingIndex: dtypes.ZeroInt(), } )
Perpetual objects.
var ( TestAddPremiumVotesMsg = &perptypes.MsgAddPremiumVotes{ Votes: []perptypes.FundingPremium{ { PerpetualId: 0, PremiumPpm: 1000, }, }, } EmptyMsgAddPremiumVotes = &perptypes.MsgAddPremiumVotes{} EmptyMsgAddPremiumVotesTxBytes []byte ValidMsgAddPremiumVotes = &perptypes.MsgAddPremiumVotes{ Votes: []perptypes.FundingPremium{ {PerpetualId: 1, PremiumPpm: 1_000}, {PerpetualId: 2, PremiumPpm: 2_000}, }, } ValidMsgAddPremiumVotesTxBytes []byte InvalidMsgAddPremiumVotes = &perptypes.MsgAddPremiumVotes{ Votes: []perptypes.FundingPremium{ {PerpetualId: 3, PremiumPpm: 3_000}, {PerpetualId: 2, PremiumPpm: 2_000}, }, } InvalidMsgAddPremiumVotesTxBytes []byte Perpetuals_DefaultGenesisState = perptypes.GenesisState{ LiquidityTiers: []perptypes.LiquidityTier{ { Id: uint32(0), Name: "Large-Cap", InitialMarginPpm: 200_000, MaintenanceFractionPpm: 500_000, ImpactNotional: 2_500_000_000, }, { Id: uint32(1), Name: "Mid-Cap", InitialMarginPpm: 300_000, MaintenanceFractionPpm: 600_000, ImpactNotional: 1_667_000_000, }, { Id: uint32(2), Name: "Small-Cap", InitialMarginPpm: 400_000, MaintenanceFractionPpm: 700_000, ImpactNotional: 1_250_000_000, }, }, Params: PerpetualsGenesisParams, Perpetuals: []perptypes.Perpetual{ { Params: perptypes.PerpetualParams{ Id: uint32(0), Ticker: "genesis_test_ticker_0", LiquidityTier: 0, }, FundingIndex: dtypes.ZeroInt(), }, { Params: perptypes.PerpetualParams{ Id: uint32(1), Ticker: "genesis_test_ticker_1", LiquidityTier: 1, }, FundingIndex: dtypes.ZeroInt(), }, }, } )
AddPremiumVotes messages.
var ( // Perpetual Positions. Long_Perp_1BTC_PositiveFunding = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), } Short_Perp_1ETH_NegativeFunding = satypes.PerpetualPosition{ PerpetualId: 1, Quantums: dtypes.NewInt(-100_000_000), FundingIndex: dtypes.NewInt(-1), } PerpetualPosition_OneBTCLong = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), } PerpetualPosition_OneBTCShort = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), } PerpetualPosition_OneTenthBTCLong = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(10_000_000), } PerpetualPosition_OneTenthBTCShort = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(-10_000_000), } PerpetualPosition_FourThousandthsBTCLong = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(400_000), } PerpetualPosition_FourThousandthsBTCShort = satypes.PerpetualPosition{ PerpetualId: 0, Quantums: dtypes.NewInt(-400_000), } PerpetualPosition_OneTenthEthLong = satypes.PerpetualPosition{ PerpetualId: 1, Quantums: dtypes.NewInt(100_000_000), } PerpetualPosition_OneTenthEthShort = satypes.PerpetualPosition{ PerpetualId: 1, Quantums: dtypes.NewInt(-100_000_000), } PerpetualPosition_MaxUint64EthLong = satypes.PerpetualPosition{ PerpetualId: 1, Quantums: dtypes.NewIntFromUint64(math.MaxUint64), } PerpetualPosition_MaxUint64EthShort = satypes.PerpetualPosition{ PerpetualId: 1, Quantums: dtypes.NewIntFromBigInt(BigNegMaxUint64()), } // Asset Positions Usdc_Asset_0 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(0), } Usdc_Asset_500 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(500_000_000), } Short_Usdc_Asset_500 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(-500_000_000), } Usdc_Asset_599 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(599_000_000), } Usdc_Asset_660 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(660_000_000), } Short_Usdc_Asset_4_600 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(-4_600_000_000), } Short_Usdc_Asset_46_000 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(-46_000_000_000), } Short_Usdc_Asset_9_900 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(-9_900_000_000), } Usdc_Asset_10_000 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(10_000_000_000), } Usdc_Asset_10_100 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(10_100_000_000), } Usdc_Asset_10_200 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(10_200_000_000), } Usdc_Asset_50_000 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(50_000_000_000), } Usdc_Asset_99_999 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(99_999_000_000), } Usdc_Asset_100_000 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(100_000_000_000), } Usdc_Asset_100_499 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(100_499_000_000), } Usdc_Asset_500_000 = satypes.AssetPosition{ AssetId: 0, Quantums: dtypes.NewInt(500_000_000_000), } Long_Asset_1BTC = satypes.AssetPosition{ AssetId: 1, Quantums: dtypes.NewInt(100_000_000), } Short_Asset_1BTC = satypes.AssetPosition{ AssetId: 1, Quantums: dtypes.NewInt(-100_000_000), } Long_Asset_1ETH = satypes.AssetPosition{ AssetId: 2, Quantums: dtypes.NewInt(1_000_000_000), } Short_Asset_1ETH = satypes.AssetPosition{ AssetId: 2, Quantums: dtypes.NewInt(-1_000_000_000), } )
var ( // Markets MarketId0 = uint32(0) MarketId1 = uint32(1) MarketId2 = uint32(2) MarketId7 = uint32(7) MarketId8 = uint32(8) MarketId9 = uint32(9) MarketId10 = uint32(10) MarketId11 = uint32(11) // Exponents Exponent9 = int32(-9) Exponent8 = int32(-8) Exponent7 = int32(-7) // Exchanges ExchangeId0 = "Exchange0" ExchangeId1 = "Exchange1" ExchangeId2 = "Exchange2" ExchangeId3 = "Exchange3" // ExchangeArray Exchange1Exchange2Array = []string{ ExchangeId1, ExchangeId2, } // MarketPriceTimestamps Market8_TimeTMinusThreshold_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeTMinusThreshold, Price: Price1, } Market8_TimeTMinusThreshold_Price2 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeTMinusThreshold, Price: Price2, } Market8_TimeTMinusThreshold_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeTMinusThreshold, Price: Price3, } Market8_TimeT_Price2 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeT, Price: Price2, } Market8_TimeT_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeT, Price: Price3, } Market8_TimeT_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId8, LastUpdatedAt: TimeT, Price: Price1, } Market9_TimeTMinusThreshold_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTMinusThreshold, Price: Price1, } Market9_TimeTMinusThreshold_Price2 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTMinusThreshold, Price: Price2, } Market9_TimeTMinusThreshold_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTMinusThreshold, Price: Price3, } Market9_TimeT_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeT, Price: Price1, } Market9_TimeT_Price2 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeT, Price: Price2, } Market9_TimeT_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeT, Price: Price3, } Market9_TimeTPlusThreshold_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTPlusThreshold, Price: Price1, } Market9_TimeTPlusThreshold_Price2 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTPlusThreshold, Price: Price2, } Market9_TimeTPlusThreshold_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId9, LastUpdatedAt: TimeTPlusThreshold, Price: Price3, } Market10_TimeT_Price4 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId10, LastUpdatedAt: TimeT, Price: Price4, } Market11_TimeT_Price5 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId11, LastUpdatedAt: TimeT, Price: Price5, } Market7_BeforeTimeT_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeTMinusThreshold, Price: Price1, } Market7_BeforeTimeT_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeTMinusThreshold, Price: Price3, } Market7_TimeT_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeT, Price: Price1, } Market7_TimeT_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeT, Price: Price3, } Market7_TimeTPlusThreshold_Price1 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeTPlusThreshold, Price: Price1, } Market7_TimeTPlusThreshold_Price3 = &daemonClientTypes.MarketPriceTimestamp{ MarketId: MarketId7, LastUpdatedAt: TimeTPlusThreshold, Price: Price3, } // Prices InvalidPrice uint64 = 0 Price1 uint64 = 1001 Price2 uint64 = 2002 Price3 uint64 = 3003 Price4 uint64 = 4004 Price5 uint64 = 500005 Price6 uint64 = 60006 Price7 uint64 = 7007 // Exchange 0 prices Exchange0_Price4_TimeT = &api.ExchangePrice{ ExchangeId: ExchangeId1, Price: Price4, LastUpdateTime: &TimeT, } // Exchange 1 prices Exchange1_Price1_TimeT = &api.ExchangePrice{ ExchangeId: ExchangeId1, Price: Price1, LastUpdateTime: &TimeT, } Exchange1_Price2_AfterTimeT = &api.ExchangePrice{ ExchangeId: ExchangeId1, Price: Price2, LastUpdateTime: &TimeTPlusThreshold, } Exchange1_Price3_BeforeTimeT = &api.ExchangePrice{ ExchangeId: ExchangeId1, Price: Price3, LastUpdateTime: &TimeTMinusThreshold, } // Exchange 2 prices Exchange2_Price2_TimeT = &api.ExchangePrice{ ExchangeId: ExchangeId2, Price: Price2, LastUpdateTime: &TimeT, } Exchange2_Price3_AfterTimeT = &api.ExchangePrice{ ExchangeId: ExchangeId2, Price: Price3, LastUpdateTime: &TimeTPlusThreshold, } Exchange2_Price1_BeforeTimeT = &api.ExchangePrice{ ExchangeId: ExchangeId2, Price: Price1, LastUpdateTime: &TimeTMinusThreshold, } // Exchange 3 prices Exchange3_Price3_TimeT = &api.ExchangePrice{ ExchangeId: ExchangeId3, Price: Price3, LastUpdateTime: &TimeT, } Exchange3_Price4_AfterTimeT = &api.ExchangePrice{ ExchangeId: ExchangeId3, Price: Price4, LastUpdateTime: &TimeTPlusThreshold, } // Price Updates Market9_SingleExchange_AtTimeUpdate = []*api.MarketPriceUpdate{ { MarketId: MarketId9, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price1_TimeT, }, }, } AtTimeTPriceUpdate = []*api.MarketPriceUpdate{ { MarketId: MarketId9, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price1_TimeT, Exchange2_Price2_TimeT, }, }, { MarketId: MarketId8, ExchangePrices: []*api.ExchangePrice{ Exchange2_Price2_TimeT, Exchange3_Price3_TimeT, }, }, { MarketId: MarketId7, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price1_TimeT, Exchange3_Price3_TimeT, }, }, } AtTimeTSingleExchangePriceUpdate = []*api.MarketPriceUpdate{ { MarketId: MarketId0, ExchangePrices: []*api.ExchangePrice{ Exchange0_Price4_TimeT, }, }, { MarketId: MarketId1, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price1_TimeT, }, }, { MarketId: MarketId2, ExchangePrices: []*api.ExchangePrice{ Exchange2_Price2_TimeT, }, }, } AtTimeTSingleExchangeSmoothedPrices = map[uint32]uint64{ MarketId0: Exchange0_Price4_TimeT.Price, MarketId1: Exchange1_Price1_TimeT.Price, MarketId2: Exchange2_Price2_TimeT.Price, } AtTimeTSingleExchangeSmoothedPricesPlus10 = map[uint32]uint64{ MarketId0: Exchange0_Price4_TimeT.Price + 10, MarketId1: Exchange1_Price1_TimeT.Price + 10, MarketId2: Exchange2_Price2_TimeT.Price + 10, } AtTimeTSingleExchangeSmoothedPricesPlus7 = map[uint32]uint64{ MarketId0: Exchange0_Price4_TimeT.Price + 7, MarketId1: Exchange1_Price1_TimeT.Price + 7, MarketId2: Exchange2_Price2_TimeT.Price + 7, } MixedTimePriceUpdate = []*api.MarketPriceUpdate{ { MarketId: MarketId9, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price1_TimeT, Exchange2_Price2_TimeT, Exchange3_Price3_TimeT, }, }, { MarketId: MarketId8, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price3_BeforeTimeT, Exchange2_Price2_TimeT, Exchange3_Price3_TimeT, }, }, { MarketId: MarketId7, ExchangePrices: []*api.ExchangePrice{ Exchange1_Price3_BeforeTimeT, Exchange2_Price1_BeforeTimeT, Exchange3_Price3_TimeT, }, }, } // Markets AllMarketParamsMinExchanges2 = []types.MarketParam{ { Id: MarketId9, Exponent: Exponent9, MinExchanges: 2, }, { Id: MarketId8, Exponent: Exponent8, MinExchanges: 2, }, { Id: MarketId7, Exponent: Exponent7, MinExchanges: 2, }, } AllMarketParamsMinExchanges3 = []types.MarketParam{ { Id: MarketId9, MinExchanges: 3, }, { Id: MarketId8, MinExchanges: 3, }, { Id: MarketId7, MinExchanges: 3, }, } SingleMarketExchangeQueryDetails = daemonClientTypes.ExchangeQueryDetails{IsMultiMarket: false} MultiMarketExchangeQueryDetails = daemonClientTypes.ExchangeQueryDetails{IsMultiMarket: true} // ExchangeQueryConfigs. Exchange1_0MaxQueries_QueryConfig = daemonClientTypes.ExchangeQueryConfig{ ExchangeId: ExchangeId1, IntervalMs: 100, TimeoutMs: 3_000, MaxQueries: 0, } Exchange1_1MaxQueries_QueryConfig = daemonClientTypes.ExchangeQueryConfig{ ExchangeId: ExchangeId1, IntervalMs: 100, TimeoutMs: 3_000, MaxQueries: 1, } Exchange1_2MaxQueries_QueryConfig = daemonClientTypes.ExchangeQueryConfig{ ExchangeId: ExchangeId1, IntervalMs: 100, TimeoutMs: 3_000, MaxQueries: 2, } // MutableExchangeMarketConfigs for 0, 1, 2, 3, and 5 markets. Exchange1_NoMarkets_MutableExchangeMarketConfig = daemonClientTypes.MutableExchangeMarketConfig{ Id: ExchangeId1, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{}, } Exchange1_1Markets_MutableExchangeMarketConfig = daemonClientTypes.MutableExchangeMarketConfig{ Id: ExchangeId1, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTC-USD", }, }, } Exchange1_2Markets_MutableExchangeMarketConfig = daemonClientTypes.MutableExchangeMarketConfig{ Id: ExchangeId1, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTC-USD", }, MarketId8: { Ticker: "ETH-USD", }, }, } Exchange1_3Markets_MutableExchangeMarketConfig = daemonClientTypes.MutableExchangeMarketConfig{ Id: ExchangeId1, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTC-USD", }, MarketId8: { Ticker: "ETH-USD", }, MarketId9: { Ticker: "LTC-USD", }, }, } Exchange1_5Markets_MutableExchangeMarketConfig = daemonClientTypes.MutableExchangeMarketConfig{ Id: ExchangeId1, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTC-USD", }, MarketId8: { Ticker: "ETH-USD", }, MarketId9: { Ticker: "LTC-USD", }, MarketId10: { Ticker: "XRP-USD", }, MarketId11: { Ticker: "BCH-USD", }, }, } CanonicalMarketExponents = map[daemonClientTypes.MarketId]daemonClientTypes.Exponent{ MarketId7: MutableMarketConfigs_5Markets[0].Exponent, MarketId8: MutableMarketConfigs_5Markets[1].Exponent, MarketId9: MutableMarketConfigs_5Markets[2].Exponent, MarketId10: MutableMarketConfigs_5Markets[3].Exponent, MarketId11: MutableMarketConfigs_5Markets[4].Exponent, } CanonicalMarketPriceTimestampResponses = map[uint32]*daemonClientTypes.MarketPriceTimestamp{ MarketId7: Market7_TimeTPlusThreshold_Price3, MarketId8: Market8_TimeTMinusThreshold_Price2, MarketId9: Market9_TimeT_Price1, MarketId10: Market10_TimeT_Price4, MarketId11: Market11_TimeT_Price5, } // ExchangeIdMarketPriceTimestamps ExchangeId1_Market9_TimeT_Price1 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId1, MarketPriceTimestamp: Market9_TimeT_Price1, } ExchangeId2_Market9_TimeT_Price2 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId2, MarketPriceTimestamp: Market9_TimeT_Price2, } ExchangeId3_Market9_TimeT_Price3 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId3, MarketPriceTimestamp: Market9_TimeT_Price3, } ExchangeId1_Market8_BeforeTimeT_Price3 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId1, MarketPriceTimestamp: Market8_TimeTMinusThreshold_Price3, } ExchangeId2_Market8_TimeT_Price2 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId2, MarketPriceTimestamp: Market8_TimeT_Price2, } ExchangeId3_Market8_TimeT_Price3 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId3, MarketPriceTimestamp: Market8_TimeT_Price3, } ExchangeId1_Market7_BeforeTimeT_Price3 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId1, MarketPriceTimestamp: Market7_BeforeTimeT_Price3, } ExchangeId2_Market7_BeforeTimeT_Price1 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId2, MarketPriceTimestamp: Market7_BeforeTimeT_Price1, } ExchangeId1_Market7_TimeT_Price1 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId1, MarketPriceTimestamp: Market7_TimeT_Price1, } ExchangeId3_Market7_TimeT_Price3 = &client.ExchangeIdMarketPriceTimestamp{ ExchangeId: ExchangeId3, MarketPriceTimestamp: Market7_TimeT_Price3, } CoinbaseMutableMarketConfig = &daemonClientTypes.MutableExchangeMarketConfig{ Id: CoinbaseExchangeName, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTC-USD", }, MarketId8: { Ticker: "ETH-USD", }, }, } BinanceMutableMarketConfig = &daemonClientTypes.MutableExchangeMarketConfig{ Id: BinanceExchangeName, MarketToMarketConfig: map[daemonClientTypes.MarketId]daemonClientTypes.MarketConfig{ MarketId7: { Ticker: "BTCUSDT", }, MarketId8: { Ticker: "ETHUSDT", }, }, } TestCanonicalExchangeIds = []string{ExchangeId1, ExchangeId2} // Test constants for starting the daemon client. TestMutableExchangeMarketConfigs = map[string]*daemonClientTypes.MutableExchangeMarketConfig{ CoinbaseExchangeName: CoinbaseMutableMarketConfig, BinanceExchangeName: BinanceMutableMarketConfig, } TestMarket7And8Params = []types.MarketParam{ { Id: 7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, ExchangeConfigJson: `{"exchanges":[{"exchangeName":"Binance","ticker":"BTCUSDT"},` + `{"exchangeName":"Coinbase","ticker":"BTC-USD"}]}`, MinExchanges: 1, MinPriceChangePpm: 50, }, { Id: 8, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, ExchangeConfigJson: `{"exchanges":[{"exchangeName":"Binance","ticker":"ETHUSDT"},` + `{"exchangeName":"Coinbase","ticker":"ETH-USD"}]}`, MinPriceChangePpm: 50, }, } TestMutableMarketConfigs = map[daemonClientTypes.MarketId]*daemonClientTypes.MutableMarketConfig{ MarketId7: { Id: MarketId7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, }, MarketId8: { Id: MarketId8, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, }, } // Pricefetcher MutableMarketConfigs for 0, 1, 2, 3 and 5 markets. MutableMarketConfigs_0Markets = []*daemonClientTypes.MutableMarketConfig{} MutableMarketConfigs_1Markets = []*daemonClientTypes.MutableMarketConfig{ { Id: MarketId7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, }, } MutableMarketConfigs_2Markets = []*daemonClientTypes.MutableMarketConfig{ { Id: MarketId7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, }, { Id: MarketId8, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, }, } MutableMarketConfigs_3Markets = []*daemonClientTypes.MutableMarketConfig{ { Id: MarketId7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, }, { Id: MarketId8, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, }, { Id: MarketId9, Pair: LtcUsdPair, Exponent: LtcUsdExponent, MinExchanges: 1, }, } MutableMarketConfigs_5Markets = []*daemonClientTypes.MutableMarketConfig{ { Id: MarketId7, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, }, { Id: MarketId8, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, }, { Id: MarketId9, Pair: LtcUsdPair, Exponent: LtcUsdExponent, MinExchanges: 1, }, { Id: MarketId10, Pair: SolUsdPair, Exponent: SolUsdExponent, MinExchanges: 1, }, { Id: MarketId11, Pair: MaticUsdPair, Exponent: MaticUsdExponent, MinExchanges: 1, }, } MarketToMutableMarketConfigs_5Markets = map[daemonClientTypes.MarketId]*daemonClientTypes.MutableMarketConfig{ MarketId7: MutableMarketConfigs_5Markets[0], MarketId8: MutableMarketConfigs_5Markets[1], MarketId9: MutableMarketConfigs_5Markets[2], MarketId10: MutableMarketConfigs_5Markets[3], MarketId11: MutableMarketConfigs_5Markets[4], } // Expected exponents for above configs. MutableMarketConfigs_3Markets_ExpectedExponents = map[daemonClientTypes.MarketId]daemonClientTypes.Exponent{ MarketId7: BtcUsdExponent, MarketId8: EthUsdExponent, MarketId9: LtcUsdExponent, } MutableMarketConfigs_5Markets_ExpectedExponents = map[daemonClientTypes.MarketId]daemonClientTypes.Exponent{ MarketId7: BtcUsdExponent, MarketId8: EthUsdExponent, MarketId9: LtcUsdExponent, MarketId10: SolUsdExponent, MarketId11: MaticUsdExponent, } TestExchangeQueryConfigs = map[string]*daemonClientTypes.ExchangeQueryConfig{ ExchangeId1: { ExchangeId: ExchangeId1, IntervalMs: 100, TimeoutMs: 3_000, MaxQueries: 2, }, ExchangeId2: { ExchangeId: ExchangeId2, IntervalMs: 100, TimeoutMs: 3_000, MaxQueries: 2, }, } TestExchangeIdToExchangeQueryDetails = map[string]daemonClientTypes.ExchangeQueryDetails{ ExchangeId1: constants.StaticExchangeDetails[ExchangeId1], ExchangeId2: constants.StaticExchangeDetails[ExchangeId2], } )
var ( ValidMarketPriceUpdates = []*types.MsgUpdateMarketPrices_MarketPrice{ types.NewMarketPriceUpdate(MarketId0, Price5), types.NewMarketPriceUpdate(MarketId1, Price6), types.NewMarketPriceUpdate(MarketId2, Price7), } // `MsgUpdateMarketPrices`. EmptyMsgUpdateMarketPrices = &types.MsgUpdateMarketPrices{} EmptyMsgUpdateMarketPricesTxBytes []byte ValidMsgUpdateMarketPrices = &types.MsgUpdateMarketPrices{ MarketPriceUpdates: ValidMarketPriceUpdates, } ValidMsgUpdateMarketPricesTxBytes []byte InvalidMsgUpdateMarketPricesStateless = &types.MsgUpdateMarketPrices{ MarketPriceUpdates: []*types.MsgUpdateMarketPrices_MarketPrice{ types.NewMarketPriceUpdate(MarketId0, 0), }, } InvalidMsgUpdateMarketPricesStatelessTxBytes []byte InvalidMsgUpdateMarketPricesStateful = &types.MsgUpdateMarketPrices{ MarketPriceUpdates: []*types.MsgUpdateMarketPrices_MarketPrice{ types.NewMarketPriceUpdate(MarketId0, Price5), types.NewMarketPriceUpdate(MarketId1, Price6), types.NewMarketPriceUpdate(99, Price3), }, } InvalidMsgUpdateMarketPricesStatefulTxBytes []byte Prices_DefaultGenesisState = types.GenesisState{ MarketParams: []types.MarketParam{ { Id: uint32(0), Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: uint32(2), ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_BTC_USD], MinPriceChangePpm: uint32(50), }, { Id: uint32(1), Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: uint32(1), ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_ETH_USD], MinPriceChangePpm: uint32(50), }, }, MarketPrices: []types.MarketPrice{ { Id: uint32(0), Exponent: BtcUsdExponent, Price: FiveBillion, }, { Id: uint32(1), Exponent: EthUsdExponent, Price: ThreeBillion, }, }, } Prices_MultiExchangeMarketGenesisState = types.GenesisState{ MarketParams: []types.MarketParam{ { Id: uint32(0), Pair: BtcUsdPair, Exponent: BtcUsdExponent, ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_BTC_USD], MinExchanges: uint32(2), MinPriceChangePpm: uint32(50), }, { Id: uint32(1), Pair: EthUsdPair, Exponent: EthUsdExponent, ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_ETH_USD], MinExchanges: uint32(2), MinPriceChangePpm: uint32(50), }, }, MarketPrices: []types.MarketPrice{ { Id: uint32(0), Exponent: BtcUsdExponent, Price: FiveBillion, }, { Id: uint32(1), Exponent: EthUsdExponent, Price: ThreeBillion, }, }, } )
var ( AlicePrivateKey = privateKeyFromMnenomic(AliceMnenomic) BobPrivateKey = privateKeyFromMnenomic(BobMnenomic) CarlPrivateKey = privateKeyFromMnenomic(CarlMnenomic) DavePrivateKey = privateKeyFromMnenomic(DaveMnenomic) )
var ( // Long-term orders. LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB5 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 5}, } LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT5 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 5}, } LongTermOrder_Alice_Num0_Id0_Clob1_Buy5_Price10_GTBT5 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 5}, } LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, } LongTermOrder_Alice_Num1_Id0_Clob0_Buy5_Price10_GTBT5 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 5}, } LongTermOrder_Alice_Num1_Id1_Clob0_Buy02BTC_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 20_000_000, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, } LongTermOrder_Alice_Num1_Id2_Clob0_Sell02BTC_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 20_000_000, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, } LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, } LongTermOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 20}, } LongTermOrder_Alice_Num0_Id1_Clob1_Sell65_Price15_GTBT25 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 65, Subticks: 15, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 25}, } LongTermOrder_Alice_Num0_Id2_Clob0_Sell65_Price10_GTBT25 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 65, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 25}, } LongTermOrder_Alice_Num1_Id4_Clob0_Buy10_Price45_GTBT20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 4, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 45, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 20}, } LongTermOrder_Alice_Num1_Id0_Clob0_Sell15_Price5_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 15, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Alice_Num1_Id1_Clob0_Sell25_Price30_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Alice_Num1_Id2_Clob0_Buy10_Price40_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Alice_Num0_Id1_Clob0_Sell20_Price10_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id0_Clob0_Sell2_Price5_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 2, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id0_Clob0_Sell5_Price5_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id1_Clob0_Sell5_Price10_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id1_Clob0_Sell50_Price10_GTBT15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, } LongTermOrder_Bob_Num0_Id0_Clob0_Buy25_Price30_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id0_Clob0_Buy35_Price30_GTBT11 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 35, Subticks: 30, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 11}, } LongTermOrder_Bob_Num0_Id1_Clob0_Buy45_Price10_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 45, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num0_Id2_Clob0_Buy15_Price5_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Bob_Num1_Id3_Clob0_Buy10_Price40_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num1, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 10, Subticks: 40, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Carl_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Carl_Num0_Id0_Clob0_Buy1BTC_Price49500_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 49_500_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Carl_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Dave_Num0_Id0_Clob0_Sell025BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Dave_Num0_Id1_Clob0_Sell025BTC_Price50001_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 25_000_000, Subticks: 50_001_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } LongTermOrder_Dave_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } // Conditional orders. ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price20_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 20, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_TakeProfit10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 10, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT15_TakeProfit25 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 25, } ConditionalOrder_Alice_Num0_Id0_Clob0_Sell5_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Sell5_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id1_Clob0_Buy15_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id1_Clob0_Buy15_Price25_GTBT15_StopLoss25 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 25, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 25, } ConditionalOrder_Alice_Num0_Id1_Clob0_Buy15_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id1_Clob0_Buy15_Price10_GTBT15_TakeProfit5 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 15, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 5, } ConditionalOrder_Alice_Num0_Id2_Clob0_Buy20_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id2_Clob0_Sell20_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id2_Clob0_Sell20_Price20_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 20, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id2_Clob0_Buy20_Price10_GTBT15_TakeProfit10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 10, } ConditionalOrder_Alice_Num0_Id3_Clob0_Buy25_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id3_Clob0_Buy25_Price25_GTBT15_StopLoss25 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 25, } ConditionalOrder_Alice_Num0_Id3_Clob0_Buy25_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id3_Clob0_Sell25_Price10_GTBT15_StopLoss10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 25, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 10, } ConditionalOrder_Alice_Num0_Id3_Clob1_Buy25_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 3, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 25, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob1_Buy5_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob1_Buy5_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob1_Buy5_Price10_GTBT15_TakeProfit30 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 30, } ConditionalOrder_Alice_Num0_Id0_Clob1_Sell5_Price10_GTBT15_StopLoss20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob1_Sell5_Price10_GTBT15_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 1, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price50_GTBT10_StopLoss51_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 50, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 51, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price50_GTBT10_StopLoss51_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 50, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 51, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 20}, } ConditionalOrder_Alice_Num1_Id0_Clob0_Sell5_Price10_GTBT15_StopLoss15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 15, } ConditionalOrder_Alice_Num1_Id1_Clob0_Sell50_Price5_GTBT30_TakeProfit10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 30}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 10, } ConditionalOrder_Alice_Num1_Id0_Clob0_Sell5_Price10_GTB15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 15}, } ConditionalOrder_Alice_Num1_Id1_Clob0_Sell50_Price5_GTB30 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, } ConditionalOrder_Alice_Num1_Id1_Clob0_Sell50_Price5_GTB30_TakeProfit20 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num1, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 5, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 30}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 20, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_TP_49995 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 49_995_000_000, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_TP_49999 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 49_999_000_000, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_TP_49999_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 49_999_000_000, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_SL_50001 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 50_001_000_000, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_SL_50005 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 50_005_000_000, } ConditionalOrder_Bob_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_TP_50001 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 50_001_000_000, } ConditionalOrder_Bob_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_TP_50005 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 50_005_000_000, } ConditionalOrder_Bob_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_SL_49995 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 49_995_000_000, } ConditionalOrder_Bob_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_SL_49999 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 49_999_000_000, } ConditionalOrder_Carl_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } ConditionalOrder_Carl_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } ConditionalOrder_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, } ConditionalOrder_Bob_Num0_Id0_Clob0_Sell10_Price10_GTBT10_PO_SL_15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 15_000_000, } ConditionalOrder_Alice_Num0_Id1_Clob0_Sell20_Price10_GTBT10_SL_15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 20, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 15_000_000, } ConditionalOrder_Bob_Num0_Id1_Clob0_Sell50_Price10_GTBT15_SL_15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 1, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 15_000_000, } ConditionalOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTBT5_SL_15 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 5}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 15_000_000, } ConditionalOrder_Dave_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_SL_50003 = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 50_003_000_000, } ConditionalOrder_Carl_Num0_Id0_Clob0_Buy05BTC_Price50000_GTBT10_SL_50003_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 50_003_000_000, } ConditionalOrder_Carl_Num0_Id0_Clob0_Sell05BTC_Price50000_GTBT10_TP_50003_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 50_003_000_000, } ConditionalOrder_Carl_Num0_Id0_Clob0_Buy05BTC_Price50000_GTBT10_SL_50003_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, ConditionType: clobtypes.Order_CONDITION_TYPE_STOP_LOSS, ConditionalOrderTriggerSubticks: 50_003_000_000, } ConditionalOrder_Carl_Num0_Id0_Clob0_Buy05BTC_Price50000_GTBT10_TP_49999_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_Conditional, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 50_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, ConditionType: clobtypes.Order_CONDITION_TYPE_TAKE_PROFIT, ConditionalOrderTriggerSubticks: 49_999_000_000, } // Long-Term post-only orders. LongTermOrder_Alice_Num0_Id0_Clob0_Buy100_Price10_GTBT15_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 15}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } LongTermOrder_Alice_Num0_Id2_Clob0_Sell65_Price10_GTBT25_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Alice_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 65, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 25}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } LongTermOrder_Bob_Num0_Id0_Clob0_Sell10_Price10_GTBT10_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 10, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } LongTermOrder_Dave_Num0_Id0_Clob0_Buy1BTC_Price50000_GTBT10_PO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Dave_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_BUY, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_POST_ONLY, } // Long-Term reduce-only orders. LongTermOrder_Bob_Num0_Id2_Clob0_Sell10_Price35_GTB20_RO = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Bob_Num0, ClientId: 2, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 10, Subticks: 35, GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 20}, ReduceOnly: true, } // Long-Term Fill Or Kill Orders. LongTermOrder_Carl_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_FOK = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_FILL_OR_KILL, } // Long-Term Immediate Or Cancel Orders. LongTermOrder_Carl_Num0_Id0_Clob0_Sell1BTC_Price50000_GTBT10_IOC = clobtypes.Order{ OrderId: clobtypes.OrderId{ SubaccountId: Carl_Num0, ClientId: 0, OrderFlags: clobtypes.OrderIdFlags_LongTerm, ClobPairId: 0, }, Side: clobtypes.Order_SIDE_SELL, Quantums: 100_000_000, Subticks: 50_000_000_000, GoodTilOneof: &clobtypes.Order_GoodTilBlockTime{GoodTilBlockTime: 10}, TimeInForce: clobtypes.Order_TIME_IN_FORCE_IOC, } )
var ( Alice_Num0 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, AliceAccAddress), Number: 0, } Alice_Num1 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, AliceAccAddress), Number: 1, } Bob_Num0 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, BobAccAddress), Number: 0, } Bob_Num1 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, BobAccAddress), Number: 1, } Bob_Num2 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, BobAccAddress), Number: 2, } Carl_Num0 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, CarlAccAddress), Number: 0, } Carl_Num1 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, CarlAccAddress), Number: 1, } Dave_Num0 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, DaveAccAddress), Number: 0, } Dave_Num1 = satypes.SubaccountId{ Owner: types.MustBech32ifyAddressBytes(config.Bech32PrefixAccAddr, DaveAccAddress), Number: 1, } )
var ( // Subaccounts. Alice_Num0_10_000USD = satypes.Subaccount{ Id: &Alice_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Alice_Num0_100_000USD = satypes.Subaccount{ Id: &Alice_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Alice_Num1_10_000USD = satypes.Subaccount{ Id: &Alice_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Alice_Num1_100_000USD = satypes.Subaccount{ Id: &Alice_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Bob_Num0_10_000USD = satypes.Subaccount{ Id: &Bob_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Bob_Num0_100_000USD = satypes.Subaccount{ Id: &Bob_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_100BTC_Short_10100USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_100, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-10_000_000_000), }, }, } Carl_Num0_1BTC_Short = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Carl_Num1_1BTC_Short = satypes.Subaccount{ Id: &Carl_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Carl_Num0_1BTC_Short_49999USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(49_999_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Carl_Num0_1BTC_Short_50000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(50_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Carl_Num0_1BTC_Short_50499USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(50_499_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Carl_Num0_1BTC_Short_54999USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(54_999_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Carl_Num0_1BTC_Long_54999USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-54_999_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, }, } Carl_Num0_1BTC_Short_55000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(55_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Carl_Num0_1BTC_Short_100000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(100_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Carl_Num0_1BTC_Short_1ETH_Long_47000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(47_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, { PerpetualId: 1, Quantums: dtypes.NewInt(1_000_000_000), }, }, } Carl_Num0_599USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_599, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_660USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_660, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_10000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_50000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_100000USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num0_0USD = satypes.Subaccount{ Id: &Carl_Num0, AssetPositions: []*satypes.AssetPosition{}, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num1_500USD = satypes.Subaccount{ Id: &Carl_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_500, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num1_Short_500USD = satypes.Subaccount{ Id: &Carl_Num1, AssetPositions: []*satypes.AssetPosition{ &Short_Usdc_Asset_500, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Carl_Num1_01BTC_Long_4600USD_Short = satypes.Subaccount{ Id: &Carl_Num1, AssetPositions: []*satypes.AssetPosition{ &Short_Usdc_Asset_4_600, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(10_000_000), }, }, } Carl_Num1_1BTC_Short_50499USD = satypes.Subaccount{ Id: &Carl_Num1, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(50_499_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Dave_Num0_01BTC_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(10_000_000), }, }, } Dave_Num0_1BTC_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Dave_Num0_1BTC_Short_100000USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_100_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-100_000_000), }, }, } Dave_Num0_1BTC_Long_45000USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-45_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Dave_Num0_1BTC_Long_45001USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-45_001_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Dave_Num0_1BTC_Long_49501USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-49_501_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, }, } Dave_Num0_1BTC_Long_50000USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-50_000_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Dave_Num0_1BTC_Long_50001USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-50_001_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), FundingIndex: dtypes.NewInt(0), }, }, } Dave_Num0_599USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_599, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Dave_Num0_10000USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Dave_Num0_500000USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_500_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Dave_Num0_100BTC_Short_10200USD = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_200, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-10_000_000_000), }, }, } Dave_Num0_100BTC_Long_9900USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Short_Usdc_Asset_9_900, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(10_000_000_000), }, }, } Dave_Num0_1BTC_Long_46000USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Short_Usdc_Asset_46_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, }, } Dave_Num0_1BTC_Long_1ETH_Long_46000USD_Short = satypes.Subaccount{ Id: &Dave_Num0, AssetPositions: []*satypes.AssetPosition{ &Short_Usdc_Asset_46_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, { PerpetualId: 1, Quantums: dtypes.NewInt(1_000_000_000), }, }, } Dave_Num1_10_000USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_000, }, PerpetualPositions: []*satypes.PerpetualPosition{}, } Dave_Num1_025BTC_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(25_000_000), }, }, } Dave_Num1_05BTC_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(50_000_000), }, }, } Dave_Num1_1BTC_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, }, } Dave_Num1_100BTC_Short_10100USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_10_100, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(-10_000_000_000), }, }, } Dave_Num1_1BTC_Long_49501USD_Short = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ { AssetId: 0, Quantums: dtypes.NewInt(-49_501_000_000), }, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 0, Quantums: dtypes.NewInt(100_000_000), }, }, } Dave_Num1_1ETH_Long_50000USD = satypes.Subaccount{ Id: &Dave_Num1, AssetPositions: []*satypes.AssetPosition{ &Usdc_Asset_50_000, }, PerpetualPositions: []*satypes.PerpetualPosition{ { PerpetualId: 1, Quantums: dtypes.NewInt(1_000_000_000), }, }, } // Quote balances. QuoteBalance_OneDollar = int64(1_000_000) // $1. InvalidSubaccountIdNumber = satypes.SubaccountId{ Owner: Alice_Num0.Owner, Number: satypes.MaxSubaccountIdNumber + 1, } InvalidSubaccountIdOwner = satypes.SubaccountId{ Owner: "This is not valid", Number: 0, } )
var ( // Time TimeZero = time.Date(1, time.Month(1), 1, 0, 0, 0, 0, time.UTC) TimeTen = time.Unix(10, 0) TimeFifteen = time.Unix(15, 0) TimeTwenty = time.Unix(20, 0) TimeTwentyFive = time.Unix(25, 0) TimeThirty = time.Unix(30, 0) TimeT = time.Unix(1650000000, 0) // 2022-04-14 22:20:00 -0700 PDT TimeTMinus1 = TimeT.Add(-time.Duration(1)) TimeTPlus1 = TimeT.Add(time.Duration(1)) TimeTMinusThreshold = TimeT.Add(-pricefeed.MaxPriceAge).Add(-time.Duration(1)) TimeTPlusThreshold = TimeT.Add(pricefeed.MaxPriceAge).Add(time.Duration(1)) Time_21st_Feb_2021 = time.Date(2021, time.Month(2), 21, 0, 0, 0, 0, time.UTC) )
var ( Transfer_Carl_Num0_Dave_Num0_Quote_500 = types.Transfer{ Sender: Carl_Num0, Recipient: Dave_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 500_000_000, } Transfer_Carl_Num0_Dave_Num0_Quote_600 = types.Transfer{ Sender: Carl_Num0, Recipient: Dave_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 600_000_000, } Transfer_Carl_Num0_Dave_Num0_Asset_600 = types.Transfer{ Sender: Carl_Num0, Recipient: Dave_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 600_000_000, } Transfer_Dave_Num0_Carl_Num0_Asset_500 = types.Transfer{ Sender: Dave_Num0, Recipient: Carl_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 500_000_000, } Transfer_Dave_Num0_Carl_Num0_Asset_500_GTB_20 = types.Transfer{ Sender: Dave_Num0, Recipient: Carl_Num0, AssetId: assettypes.AssetUsdc.Id, Amount: 500_000_000, } )
var ( MsgDepositToSubaccount_Alice_To_Alice_Num0_500 = types.MsgDepositToSubaccount{ Sender: AliceAccAddress.String(), Recipient: Alice_Num0, AssetId: assettypes.AssetUsdc.Id, Quantums: 500_000_000, } MsgDepositToSubaccount_Alice_To_Carl_Num0_750 = types.MsgDepositToSubaccount{ Sender: AliceAccAddress.String(), Recipient: Carl_Num0, AssetId: assettypes.AssetUsdc.Id, Quantums: 750_000_000, } )
Test constants for deposit-to-subaccount messages.
var ( MsgWithdrawFromSubaccount_Alice_Num0_To_Alice_500 = types.MsgWithdrawFromSubaccount{ Sender: Alice_Num0, Recipient: AliceAccAddress.String(), AssetId: assettypes.AssetUsdc.Id, Quantums: 500_000_000, } MsgWithdrawFromSubaccount_Carl_Num0_To_Alice_750 = types.MsgWithdrawFromSubaccount{ Sender: Carl_Num0, Recipient: AliceAccAddress.String(), AssetId: assettypes.AssetUsdc.Id, Quantums: 750_000_000, } )
Test constants for withdraw-from-subaccount messages.
var (
Duration_OneYear = time.Hour * 24 * 365
)
var (
EmptyAnteHandler = func(c sdk.Context, t sdk.Tx, b bool) (sdk.Context, error) { return c, nil }
)
var ( // Get state position functions. GetStatePosition_ZeroPositionSize = func( subaccountId satypes.SubaccountId, clobPairId clobtypes.ClobPairId, ) ( statePositionSize *big.Int, ) { return big.NewInt(0) } )
var LiquidityTiers = []perptypes.LiquidityTier{
{
Id: 0,
Name: "0",
InitialMarginPpm: 1_000_000,
MaintenanceFractionPpm: 1_000_000,
ImpactNotional: 500_000_000,
},
{
Id: 1,
Name: "1",
InitialMarginPpm: 1_000_000,
MaintenanceFractionPpm: 750_000,
ImpactNotional: 500_000_000,
},
{
Id: 2,
Name: "2",
InitialMarginPpm: 1_000_000,
MaintenanceFractionPpm: 0,
ImpactNotional: 500_000_000,
},
{
Id: 3,
Name: "3",
InitialMarginPpm: 200_000,
MaintenanceFractionPpm: 500_000,
ImpactNotional: 2_500_000_000,
},
{
Id: 4,
Name: "4",
InitialMarginPpm: 500_000,
MaintenanceFractionPpm: 800_000,
ImpactNotional: 1_000_000_000,
},
{
Id: 5,
Name: "5",
InitialMarginPpm: 500_000,
MaintenanceFractionPpm: 600_000,
ImpactNotional: 1_000_000_000,
},
{
Id: 6,
Name: "6",
InitialMarginPpm: 200_000,
MaintenanceFractionPpm: 900_000,
ImpactNotional: 2_500_000_000,
},
{
Id: 7,
Name: "7",
InitialMarginPpm: 0,
MaintenanceFractionPpm: 0,
ImpactNotional: 1_000_000_000,
},
{
Id: 8,
Name: "8",
InitialMarginPpm: 9_910,
MaintenanceFractionPpm: 1_000_000,
ImpactNotional: 50_454_000_000,
},
{
Id: 101,
Name: "101",
InitialMarginPpm: 200_000,
MaintenanceFractionPpm: 500_000,
ImpactNotional: 2_500_000_000,
},
}
LiquidityTier objects.
var PerpetualFeeParams = types.PerpetualFeeParams{ Tiers: []*types.PerpetualFeeTier{ { Name: "1", MakerFeePpm: 200, TakerFeePpm: 500, }, }, }
var PerpetualFeeParamsMakerRebate = types.PerpetualFeeParams{ Tiers: []*types.PerpetualFeeTier{ { Name: "1", MakerFeePpm: -200, TakerFeePpm: 500, }, }, }
var PerpetualFeeParamsNoFee = types.PerpetualFeeParams{ Tiers: []*types.PerpetualFeeTier{ { Name: "1", MakerFeePpm: 0, TakerFeePpm: 0, }, }, }
var PerpetualsGenesisParams = perptypes.Params{ FundingRateClampFactorPpm: TestFundingRateClampFactorPpm, PremiumVoteClampFactorPpm: TestPremiumVoteClampFactorPpm, MinNumVotesPerSample: TestMinNumVotesPerSample, }
var Perpetuals_GenesisState_ParamsOnly = perptypes.GenesisState{ Params: PerpetualsGenesisParams, }
var TestMarketExchangeConfigs = map[pricefeedclient.MarketId]string{ exchange_config.MARKET_BTC_USD: `{ "exchanges": [ { "exchangeName": "Binance", "ticker": "BTCUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "BinanceUS", "ticker": "BTCUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Bitfinex", "ticker": "tBTCUSD" }, { "exchangeName": "Bitstamp", "ticker": "BTC/USD" }, { "exchangeName": "Bybit", "ticker": "BTCUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "CoinbasePro", "ticker": "BTC-USD" }, { "exchangeName": "CryptoCom", "ticker": "BTC_USD" }, { "exchangeName": "Kraken", "ticker": "XXBTZUSD" }, { "exchangeName": "Mexc", "ticker": "BTC_USDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Okx", "ticker": "BTC-USDT", "adjustByMarket": "USDT-USD" } ] }`, exchange_config.MARKET_ETH_USD: `{ "exchanges": [ { "exchangeName": "Binance", "ticker": "ETHUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "BinanceUS", "ticker": "ETHUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Bitfinex", "ticker": "tETHUSD" }, { "exchangeName": "Bitstamp", "ticker": "ETH/USD" }, { "exchangeName": "Bybit", "ticker": "ETHUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "CoinbasePro", "ticker": "ETH-USD" }, { "exchangeName": "CryptoCom", "ticker": "ETH_USD" }, { "exchangeName": "Kraken", "ticker": "XETHZUSD" }, { "exchangeName": "Mexc", "ticker": "ETH_USDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Okx", "ticker": "ETH-USDT", "adjustByMarket": "USDT-USD" } ] }`, exchange_config.MARKET_SOL_USD: `{ "exchanges": [ { "exchangeName": "Binance", "ticker": "SOLUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Bitfinex", "ticker": "tSOLUSD", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Bybit", "ticker": "SOLUSDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "CoinbasePro", "ticker": "SOL-USD" }, { "exchangeName": "CryptoCom", "ticker": "SOL_USD" }, { "exchangeName": "Huobi", "ticker": "solusdt", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Kraken", "ticker": "SOLUSD" }, { "exchangeName": "Kucoin", "ticker": "SOL-USDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Mexc", "ticker": "SOL_USDT", "adjustByMarket": "USDT-USD" }, { "exchangeName": "Okx", "ticker": "SOL-USDT", "adjustByMarket": "USDT-USD" } ] }`, }
var TestMarketIdsToExponents = map[uint32]int32{ 0: BtcUsdExponent, 1: EthUsdExponent, 2: SolUsdExponent, }
var TestMarketParams = []types.MarketParam{ { Id: 0, Pair: BtcUsdPair, Exponent: BtcUsdExponent, MinExchanges: 1, MinPriceChangePpm: 50, ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_BTC_USD], }, { Id: 1, Pair: EthUsdPair, Exponent: EthUsdExponent, MinExchanges: 1, MinPriceChangePpm: 50, ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_ETH_USD], }, { Id: 2, Pair: SolUsdPair, Exponent: SolUsdExponent, MinExchanges: 1, MinPriceChangePpm: 50, ExchangeConfigJson: TestMarketExchangeConfigs[exchange_config.MARKET_SOL_USD], }, }
var TestMarketPrices = []types.MarketPrice{ { Id: 0, Exponent: BtcUsdExponent, Price: FiveBillion, }, { Id: 1, Exponent: EthUsdExponent, Price: ThreeBillion, }, { Id: 2, Exponent: SolUsdExponent, Price: FiveBillion, }, }
var TestPricesGenesisState = types.GenesisState{ MarketParams: TestMarketParams, MarketPrices: TestMarketPrices, }
Functions ¶
func BigNegMaxUint64 ¶
BigNegMaxUint64 returns a `big.Int` that is set to -math.MaxUint64.
func FundingSamples_Constant_0_001_Percent_Length_60_With_Noises ¶
func FundingSamples_Constant_0_001_Percent_Length_60_With_Noises() ( result []int32, )
Return a list of 60 funding premium samples, with 30 equal to 0.001% or 1000 in ppm, 15 equal to -0.1% and 15 equal to 0.1%.
func GenerateConstantFundingPremiums ¶
Return a list of `count` constant funding premiums equal to `value`.
func GenerateEpochGenesisStateWithoutFunding ¶
func GenerateEpochGenesisStateWithoutFunding() types.GenesisState
GenerateEpochGenesisStateWithoutFunding is a testutil function to generate genesis state for the epochs module where no new epochs will trigger for `funding-tick` and `funding-sample` within the next 365 days, meaning that there will be no funding payment for unit and end-to-end tests that use this genesis state.
func GenerateFundingSamplesWithValues ¶
Returns a funding sample list of length `n = sum(counts)`, where each `values[i]` appears `counts[i]` times.
func GetPrivateKeyFromAddress ¶
func GetPrivateKeyFromAddress(accAddress string) cryptotypes.PrivKey
GetPrivateKeyFromAddress returns the private key for the specified account address. Note that this panics if the account address is not one of the well known accounts.
Types ¶
This section is empty.
Source Files ¶
- addresses.go
- antehandler.go
- assets.go
- bridge.go
- clob_pair.go
- collateralization.go
- delaymsg.go
- encoding.go
- epochs.go
- feetiers.go
- genesis.go
- get_state_position.go
- hashes.go
- indexer_messages.go
- liquidation_configs.go
- liquidation_orders.go
- messages.go
- mnemonics.go
- operations.go
- order_cancellations.go
- order_ids.go
- orders.go
- perpetuals.go
- positions.go
- pricefeed.go
- prices.go
- private_keys.go
- stateful_orders.go
- subaccount_ids.go
- subaccounts.go
- time.go
- transfers.go