Drift v2 decoder
Decode Drift v2 instructions, accounts and events in Rust with carbon-drift-v2-decoder 2.0.0. Program ID dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.
On this page
carbon-drift-v2-decoder decodes the instructions, accounts and events of the Drift v2 program (dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH): 249 instructions, 27 account types, 26 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-drift-v2-decoder 2.0.0 |
| Install | cargo add carbon-drift-v2-decoder@2. |
| Program ID | dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH (carbon_) |
| Category | Perpetuals & derivatives |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: |
| Event enum | instructions:: |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-drift-v2-decoder/2.0.0 |
| Source | decoders/drift-v2-decoder |
Other perpetuals and derivatives decoders: Jupiter Perpetuals, Zeta Markets. To decode several in one pipeline, see perpetuals and derivatives decoders.
The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.
Usage#
This program crawls recent Drift v2 transactions from the public RPC and prints every decoded PlaceAndTakePerpOrder instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-drift-v2-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/fulluse {
carbon_core::{
error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_drift_v2_decoder::{instructions::DriftV2Instruction, DriftV2Decoder, PROGRAM_ID},
carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
std::sync::Arc,
};
#[tokio::main]
async fn main() -> CarbonResult<()> {
env_logger::init();
// Fetches the program's recent transactions over JSON-RPC, newest first.
let datasource = RpcTransactionCrawler::new(
"https://api.mainnet-beta.solana.com".to_string(),
PROGRAM_ID,
ConnectionConfig::default(),
Filters::new(None, None, None),
None,
);
Pipeline::builder()
.datasource(datasource)
.metrics(Arc::new(LogMetrics::new()))
.instruction(DriftV2Decoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, DriftV2Instruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, DriftV2Instruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let DriftV2Instruction::PlaceAndTakePerpOrder { data, accounts, .. } = input.decoded_instruction {
println!("place_and_take_perp_order {signature}: {data:?} state={}", accounts.state);
}
Ok(())
}
}RUST_LOG=info cargo runEach PlaceAndTakePerpOrder instruction prints one line with the transaction signature and the decoded PlaceAndTakePerpOrder data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See stream with RPC for the crawler options.
Events published with Anchor's emit_cpi! arrive as the CpiEvent instruction. Match them with DriftV2Instruction:: (import instructions::); see Events. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_.
Decode accounts#
The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with programSubscribe on the public WebSocket endpoint and prints every decoded PerpMarket account as it changes. Add the datasource and the Solana RPC types it takes:
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2use {
carbon_core::{
account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_drift_v2_decoder::{accounts::DriftV2Account, DriftV2Decoder, PROGRAM_ID},
carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
std::sync::Arc,
};
#[tokio::main]
async fn main() -> CarbonResult<()> {
env_logger::init();
// Streams every change to an account owned by the program (programSubscribe).
let config = RpcProgramAccountsConfig {
account_config: RpcAccountInfoConfig {
encoding: Some(UiAccountEncoding::Base64),
..Default::default()
},
..Default::default()
};
let datasource = RpcProgramSubscribe::new(
"wss://api.mainnet-beta.solana.com".to_string(),
Filters::new(PROGRAM_ID, Some(config)),
);
Pipeline::builder()
.datasource(datasource)
.metrics(Arc::new(LogMetrics::new()))
.account(DriftV2Decoder, AccountLogger)
.build()?
.run()
.await
}
struct AccountLogger;
impl Processor<AccountProcessorInputType<'_, DriftV2Account>> for AccountLogger {
async fn process(
&mut self,
input: &AccountProcessorInputType<'_, DriftV2Account>,
) -> CarbonResult<()> {
if let DriftV2Account::PerpMarket(perp_market) = &input.decoded_account.data {
println!("perp_market {}: {perp_market:?}", input.metadata.pubkey);
}
Ok(())
}
}RUST_LOG=info cargo runEach update to a PerpMarket account prints its address and decoded fields; the program runs until you stop it. Cargo resolves solana-client to 4.2.2, the exact version the datasource pins, so both use the same RpcProgramAccountsConfig type. To load every existing account once instead of streaming changes, see load account state.
Instructions#
Variants of DriftV2Instruction. Each is DriftV2Instruction::, where data and accounts are the types listed under the variant, exported from carbon_. Discriminators are the leading bytes of the instruction data, in hex.
How an instruction decodes. The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:
- The instruction's program ID is
dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH. - The data starts with the variant's discriminator, and the rest deserializes into its data type.
- The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).
Accounts. They are matched by position, in the order listed. An account marked optional is None only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for Some(PROGRAM_ too. Accounts after the listed ones are in accounts. as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input. and ., which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.
AddAmmConstituentMappingData#
Discriminator a4ec822876b32eeb · data AddAmmConstituentMappingData · accounts AddAmmConstituentMappingDataInstructionAccounts.
| Field | Type |
|---|---|
amm_ | Vec< |
Required accounts: 6; extras go to remaining.
Fields of AddAmmConstituentMappingDataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | amm_ | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | state | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
AddInsuranceFundStake#
Discriminator fb90730bde2f3eec · data AddInsuranceFundStake · accounts AddInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 10; extras go to remaining.
Fields of AddInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | insurance_ | Pubkey |
| 3 | user_stats | Pubkey |
| 4 | authority | Pubkey |
| 5 | spot_ | Pubkey |
| 6 | insurance_ | Pubkey |
| 7 | drift_ | Pubkey |
| 8 | user_ | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
AddMarketToAmmCache#
Discriminator 7095c3de7c0757ed · data AddMarketToAmmCache · accounts AddMarketToAmmCacheInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of AddMarketToAmmCacheInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | amm_cache | Pubkey |
| 3 | perp_market | Pubkey |
| 4 | rent | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
AdminDeposit#
Discriminator d24241b666d6b01e · data AdminDeposit · accounts AdminDepositInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 6; extras go to remaining.
Fields of AdminDepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | admin | Pubkey |
| 3 | spot_ | Pubkey |
| 4 | admin_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
AdminUpdateUserStatsPausedOperations#
Discriminator b7683f96f0c7030a · data AdminUpdateUserStatsPausedOperations · accounts AdminUpdateUserStatsPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
paused_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of AdminUpdateUserStatsPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | user_stats | Pubkey |
| 3… | remaining | Vec< |
AdminWithdrawFromInsuranceFundVault#
Discriminator e4d0bff6a93abdd5 · data AdminWithdrawFromInsuranceFundVault · accounts AdminWithdrawFromInsuranceFundVaultInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 7; extras go to remaining.
Fields of AdminWithdrawFromInsuranceFundVaultInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | insurance_ | Pubkey |
| 4 | recipient_ | Pubkey |
| 5 | token_ | Pubkey |
| 6 | drift_ | Pubkey |
| 7… | remaining | Vec< |
BeginInsuranceFundSwap#
Discriminator b0458fcd2084a300 · data BeginInsuranceFundSwap · accounts BeginInsuranceFundSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
amount_in | u64 |
Required accounts: 10; extras go to remaining.
Fields of BeginInsuranceFundSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | out_ | Pubkey |
| 3 | in_ | Pubkey |
| 4 | out_ | Pubkey |
| 5 | in_ | Pubkey |
| 6 | if_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | drift_ | Pubkey |
| 9 | instructions | Pubkey |
| 10… | remaining | Vec< |
BeginLpSwap#
Discriminator 402c18c7307d435b · data BeginLpSwap · accounts BeginLpSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
amount_in | u64 |
Required accounts: 11; extras go to remaining.
Fields of BeginLpSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | signer_ | Pubkey |
| 3 | signer_ | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | constituent_ | Pubkey |
| 6 | out_ | Pubkey |
| 7 | in_ | Pubkey |
| 8 | lp_pool | Pubkey |
| 9 | instructions | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
BeginSwap#
Discriminator ae6de401f269e869 · data BeginSwap · accounts BeginSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
amount_in | u64 |
Required accounts: 11; extras go to remaining.
Fields of BeginSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | out_ | Pubkey |
| 5 | in_ | Pubkey |
| 6 | out_ | Pubkey |
| 7 | in_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | drift_ | Pubkey |
| 10 | instructions | Pubkey |
| 11… | remaining | Vec< |
CancelOrder#
Discriminator 5f81edf00831df84 · data CancelOrder · accounts CancelOrderInstructionAccounts.
| Field | Type |
|---|---|
order_id | Option<u32> |
Required accounts: 3; extras go to remaining.
Fields of CancelOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
CancelOrderByUserId#
Discriminator 6bd3fa8512253964 · data CancelOrderByUserId · accounts CancelOrderByUserIdInstructionAccounts.
| Field | Type |
|---|---|
user_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of CancelOrderByUserIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
CancelOrders#
Discriminator eee15f9ee36708c2 · data CancelOrders · accounts CancelOrdersInstructionAccounts.
| Field | Type |
|---|---|
market_type | Option< |
market_ | Option<u16> |
direction | Option< |
Required accounts: 3; extras go to remaining.
Fields of CancelOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
CancelOrdersByIds#
Discriminator 861390a55ef0d25e · data CancelOrdersByIds · accounts CancelOrdersByIdsInstructionAccounts.
| Field | Type |
|---|---|
order_ids | Vec<u32> |
Required accounts: 3; extras go to remaining.
Fields of CancelOrdersByIdsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
CancelRequestRemoveInsuranceFundStake#
Discriminator 61eb4e3ed42af17f · data CancelRequestRemoveInsuranceFundStake · accounts CancelRequestRemoveInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 5; extras go to remaining.
Fields of CancelRequestRemoveInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | spot_market | Pubkey |
| 1 | insurance_ | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | insurance_ | Pubkey |
| 5… | remaining | Vec< |
ChangeApprovedBuilder#
Discriminator b386d32dc305bdad · data ChangeApprovedBuilder · accounts ChangeApprovedBuilderInstructionAccounts.
| Field | Type |
|---|---|
builder | Pubkey |
max_fee_bps | u16 |
add | bool |
Required accounts: 4; extras go to remaining.
Fields of ChangeApprovedBuilderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | escrow | Pubkey |
| 1 | authority | Pubkey |
| 2 | payer | Pubkey |
| 3 | system_ | Pubkey |
| 4… | remaining | Vec< |
ChangeSignedMsgWsDelegateStatus#
Discriminator fccafcdbb31b548a · data ChangeSignedMsgWsDelegateStatus · accounts ChangeSignedMsgWsDelegateStatusInstructionAccounts.
| Field | Type |
|---|---|
delegate | Pubkey |
add | bool |
Required accounts: 3; extras go to remaining.
Fields of ChangeSignedMsgWsDelegateStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signed_ | Pubkey |
| 1 | authority | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
DeleteAmmCache#
Discriminator d882d7cee9e8bf58 · data DeleteAmmCache · accounts DeleteAmmCacheInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of DeleteAmmCacheInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | amm_cache | Pubkey |
| 3… | remaining | Vec< |
DeleteInitializedPerpMarket#
Discriminator 5b9a18576a3bbe42 · data DeleteInitializedPerpMarket · accounts DeleteInitializedPerpMarketInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of DeleteInitializedPerpMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
DeleteInitializedSpotMarket#
Discriminator 1f8c43bfbd1465dd · data DeleteInitializedSpotMarket · accounts DeleteInitializedSpotMarketInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 7; extras go to remaining.
Fields of DeleteInitializedSpotMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | spot_ | Pubkey |
| 4 | insurance_ | Pubkey |
| 5 | drift_ | Pubkey |
| 6 | token_ | Pubkey |
| 7… | remaining | Vec< |
DeleteOpenbookV2FulfillmentConfig#
Discriminator 12c68a8e8a304fbb · data DeleteOpenbookV2FulfillmentConfig · accounts DeleteOpenbookV2FulfillmentConfigInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of DeleteOpenbookV2FulfillmentConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | openbook_ | Pubkey |
| 2 | admin | Pubkey |
| 3… | remaining | Vec< |
DeletePrelaunchOracle#
Discriminator 3ba964314511adfd · data DeletePrelaunchOracle · accounts DeletePrelaunchOracleInstructionAccounts.
| Field | Type |
|---|---|
perp_ | u16 |
Required accounts: 4; extras go to remaining.
Fields of DeletePrelaunchOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | prelaunch_ | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | state | Pubkey |
| 4… | remaining | Vec< |
DeleteSerumFulfillmentConfig#
Discriminator 1e8f5830f9679aff · data DeleteSerumFulfillmentConfig · accounts DeleteSerumFulfillmentConfigInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of DeleteSerumFulfillmentConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | serum_ | Pubkey |
| 2 | admin | Pubkey |
| 3… | remaining | Vec< |
DeleteSignedMsgUserOrders#
Discriminator ddf780fdd4fe2e99 · data DeleteSignedMsgUserOrders · accounts DeleteSignedMsgUserOrdersInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of DeleteSignedMsgUserOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signed_ | Pubkey |
| 1 | state | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
DeleteUser#
Discriminator ba5511f9dbe762fb · data DeleteUser · accounts DeleteUserInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of DeleteUserInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | state | Pubkey |
| 3 | authority | Pubkey |
| 4… | remaining | Vec< |
Deposit#
Discriminator f223c68952e1f2b6 · data Deposit · accounts DepositInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
reduce_only | bool |
Required accounts: 7; extras go to remaining.
Fields of DepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | spot_ | Pubkey |
| 5 | user_ | Pubkey |
| 6 | token_ | Pubkey |
| 7… | remaining | Vec< |
DepositIntoInsuranceFundStake#
Discriminator 0416e2c97c2c52e6 · data DepositIntoInsuranceFundStake · accounts DepositIntoInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 10; extras go to remaining.
Fields of DepositIntoInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signer | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | insurance_ | Pubkey |
| 4 | user_stats | Pubkey |
| 5 | spot_ | Pubkey |
| 6 | insurance_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | drift_ | Pubkey |
| 10… | remaining | Vec< |
DepositIntoIsolatedPerpPosition#
Discriminator 6530ff997f79aa1a · data DepositIntoIsolatedPerpPosition · accounts DepositIntoIsolatedPerpPositionInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
perp_ | u16 |
amount | u64 |
Required accounts: 7; extras go to remaining.
Fields of DepositIntoIsolatedPerpPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | spot_ | Pubkey |
| 5 | user_ | Pubkey |
| 6 | token_ | Pubkey |
| 7… | remaining | Vec< |
DepositIntoPerpMarketFeePool#
Discriminator 223a39446150f406 · data DepositIntoPerpMarketFeePool · accounts DepositIntoPerpMarketFeePoolInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 8; extras go to remaining.
Fields of DepositIntoPerpMarketFeePoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | admin | Pubkey |
| 3 | source_ | Pubkey |
| 4 | drift_ | Pubkey |
| 5 | quote_ | Pubkey |
| 6 | spot_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
DepositIntoSpotMarketRevenuePool#
Discriminator 5c28972a7afe8bf6 · data DepositIntoSpotMarketRevenuePool · accounts DepositIntoSpotMarketRevenuePoolInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 6; extras go to remaining.
Fields of DepositIntoSpotMarketRevenuePoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | authority | Pubkey |
| 3 | spot_ | Pubkey |
| 4 | user_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
DepositIntoSpotMarketVault#
Discriminator 30fc7749ffcdaef7 · data DepositIntoSpotMarketVault · accounts DepositIntoSpotMarketVaultInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 6; extras go to remaining.
Fields of DepositIntoSpotMarketVaultInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | admin | Pubkey |
| 3 | source_ | Pubkey |
| 4 | spot_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
DepositToProgramVault#
Discriminator ebab795039ef93dc · data DepositToProgramVault · accounts DepositToProgramVaultInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 9; extras go to remaining.
Fields of DepositToProgramVaultInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | constituent | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | spot_market | Pubkey |
| 5 | spot_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | mint | Pubkey |
| 8 | oracle | Pubkey |
| 9… | remaining | Vec< |
DisableUserHighLeverageMode#
Discriminator b79b2d00e255d545 · data DisableUserHighLeverageMode · accounts DisableUserHighLeverageModeInstructionAccounts.
| Field | Type |
|---|---|
disable_ | bool |
Required accounts: 4; extras go to remaining.
Fields of DisableUserHighLeverageModeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | user | Pubkey |
| 3 | high_ | Pubkey |
| 4… | remaining | Vec< |
EnableUserHighLeverageMode#
Discriminator e718e670c9ad49b8 · data EnableUserHighLeverageMode · accounts EnableUserHighLeverageModeInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
Required accounts: 4; extras go to remaining.
Fields of EnableUserHighLeverageModeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3 | high_ | Pubkey |
| 4… | remaining | Vec< |
EndInsuranceFundSwap#
Discriminator cee66208f99ea9a7 · data EndInsuranceFundSwap · accounts EndInsuranceFundSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
Required accounts: 10; extras go to remaining.
Fields of EndInsuranceFundSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | out_ | Pubkey |
| 3 | in_ | Pubkey |
| 4 | out_ | Pubkey |
| 5 | in_ | Pubkey |
| 6 | if_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | drift_ | Pubkey |
| 9 | instructions | Pubkey |
| 10… | remaining | Vec< |
EndLpSwap#
Discriminator 637dd6a581affd87 · data EndLpSwap · accounts EndLpSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
Required accounts: 11; extras go to remaining.
Fields of EndLpSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | signer_ | Pubkey |
| 3 | signer_ | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | constituent_ | Pubkey |
| 6 | out_ | Pubkey |
| 7 | in_ | Pubkey |
| 8 | lp_pool | Pubkey |
| 9 | instructions | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
EndSwap#
Discriminator b1b81bc1220dd291 · data EndSwap · accounts EndSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
limit_price | Option<u64> |
reduce_only | Option< |
Required accounts: 11; extras go to remaining.
Fields of EndSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | out_ | Pubkey |
| 5 | in_ | Pubkey |
| 6 | out_ | Pubkey |
| 7 | in_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | drift_ | Pubkey |
| 10 | instructions | Pubkey |
| 11… | remaining | Vec< |
FillPerpOrder#
Discriminator 0dbcf86786d96af0 · data FillPerpOrder · accounts FillPerpOrderInstructionAccounts.
| Field | Type |
|---|---|
order_id | Option<u32> |
maker_ | Option<u32> |
Required accounts: 6; extras go to remaining.
Fields of FillPerpOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | filler_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
FillSpotOrder#
Discriminator d4ce82ad1522c728 · data FillSpotOrder · accounts FillSpotOrderInstructionAccounts.
| Field | Type |
|---|---|
order_id | Option<u32> |
fulfillment_ | Option< |
maker_ | Option<u32> |
Required accounts: 6; extras go to remaining.
Fields of FillSpotOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | filler_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
ForceCancelOrders#
Discriminator 40b5c43fde4840e8 · data ForceCancelOrders · accounts ForceCancelOrdersInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ForceCancelOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | user | Pubkey |
| 4… | remaining | Vec< |
ForceDeleteUser#
Discriminator 02f1c3ace318fe9e · data ForceDeleteUser · accounts ForceDeleteUserInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of ForceDeleteUserInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | state | Pubkey |
| 3 | authority | Pubkey |
| 4 | keeper | Pubkey |
| 5 | drift_ | Pubkey |
| 6… | remaining | Vec< |
Initialize#
Discriminator afaf6d1f0d989bed · data Initialize · accounts InitializeInstructionAccounts.
No data fields.
Required accounts: 7; extras go to remaining.
Fields of InitializeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | quote_ | Pubkey |
| 3 | drift_ | Pubkey |
| 4 | rent | Pubkey |
| 5 | system_ | Pubkey |
| 6 | token_ | Pubkey |
| 7… | remaining | Vec< |
InitializeAmmCache#
Discriminator 263cab9ecb3a8908 · data InitializeAmmCache · accounts InitializeAmmCacheInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of InitializeAmmCacheInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | amm_cache | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeConstituent#
Discriminator 0cc42dda5d590021 · data InitializeConstituent · accounts InitializeConstituentInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
decimals | u8 |
max_ | i64 |
swap_ | i64 |
swap_ | i64 |
max_ | u64 |
oracle_ | u64 |
cost_ | i32 |
constituent_ | Option<i16> |
constituent_ | u64 |
derivative_ | u64 |
volatility | u64 |
gamma_ | u8 |
gamma_ | u8 |
xi | u8 |
new_ | Vec<i64> |
Required accounts: 12; extras go to remaining.
Fields of InitializeConstituentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | lp_pool | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | constituent | Pubkey |
| 6 | spot_market | Pubkey |
| 7 | spot_ | Pubkey |
| 8 | constituent_ | Pubkey |
| 9 | rent | Pubkey |
| 10 | system_ | Pubkey |
| 11 | token_ | Pubkey |
| 12… | remaining | Vec< |
InitializeFuelOverflow#
Discriminator 58df84a1d0588e2a · data InitializeFuelOverflow · accounts InitializeFuelOverflowInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of InitializeFuelOverflowInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | fuel_ | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | authority | Pubkey |
| 3 | payer | Pubkey |
| 4 | rent | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
InitializeHighLeverageModeConfig#
Discriminator d5a75df6d0825af8 · data InitializeHighLeverageModeConfig · accounts InitializeHighLeverageModeConfigInstructionAccounts.
| Field | Type |
|---|---|
max_users | u32 |
Required accounts: 5; extras go to remaining.
Fields of InitializeHighLeverageModeConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | high_ | Pubkey |
| 2 | state | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeIfRebalanceConfig#
Discriminator 0855b8a7b03dade2 · data InitializeIfRebalanceConfig · accounts InitializeIfRebalanceConfigInstructionAccounts.
| Field | Type |
|---|---|
params | IfRebalanceConfigParams |
Required accounts: 5; extras go to remaining.
Fields of InitializeIfRebalanceConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | if_ | Pubkey |
| 2 | state | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeInsuranceFundStake#
Discriminator bbb3f346f85a5c93 · data InitializeInsuranceFundStake · accounts InitializeInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 8; extras go to remaining.
Fields of InitializeInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | spot_market | Pubkey |
| 1 | insurance_ | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | state | Pubkey |
| 4 | authority | Pubkey |
| 5 | payer | Pubkey |
| 6 | rent | Pubkey |
| 7 | system_ | Pubkey |
| 8… | remaining | Vec< |
InitializeLpPool#
Discriminator f24001de8e2ecce3 · data InitializeLpPool · accounts InitializeLpPoolInstructionAccounts.
| Field | Type |
|---|---|
lp_pool_id | u8 |
min_ | i64 |
max_aum | u128 |
max_ | u64 |
whitelist_ | Pubkey |
Required accounts: 11; extras go to remaining.
Fields of InitializeLpPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | mint | Pubkey |
| 3 | lp_ | Pubkey |
| 4 | amm_ | Pubkey |
| 5 | constituent_ | Pubkey |
| 6 | constituent_ | Pubkey |
| 7 | state | Pubkey |
| 8 | token_ | Pubkey |
| 9 | rent | Pubkey |
| 10 | system_ | Pubkey |
| 11… | remaining | Vec< |
InitializeOpenbookV2FulfillmentConfig#
Discriminator 07dd67996b391bc5 · data InitializeOpenbookV2FulfillmentConfig · accounts InitializeOpenbookV2FulfillmentConfigInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 10; extras go to remaining.
Fields of InitializeOpenbookV2FulfillmentConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | base_ | Pubkey |
| 1 | quote_ | Pubkey |
| 2 | state | Pubkey |
| 3 | openbook_ | Pubkey |
| 4 | openbook_ | Pubkey |
| 5 | drift_ | Pubkey |
| 6 | openbook_ | Pubkey |
| 7 | admin | Pubkey |
| 8 | rent | Pubkey |
| 9 | system_ | Pubkey |
| 10… | remaining | Vec< |
InitializePerpMarket#
Discriminator 8409e5767576753e · data InitializePerpMarket · accounts InitializePerpMarketInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amm_ | u128 |
amm_ | u128 |
amm_ | i64 |
amm_ | u128 |
oracle_ | OracleSource |
contract_ | ContractTier |
margin_ | u32 |
margin_ | u32 |
liquidator_ | u32 |
if_ | u32 |
imf_factor | u32 |
active_ | bool |
base_spread | u32 |
max_spread | u32 |
max_ | u128 |
max_ | u64 |
quote_ | u64 |
order_ | u64 |
order_ | u64 |
min_ | u64 |
concentration_ | u128 |
curve_ | u8 |
amm_ | u8 |
name | [u8; 32] |
lp_pool_id | u8 |
Required accounts: 6; extras go to remaining.
Fields of InitializePerpMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | oracle | Pubkey |
| 4 | rent | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
InitializePhoenixFulfillmentConfig#
Discriminator 87846e6bb9a0a99a · data InitializePhoenixFulfillmentConfig · accounts InitializePhoenixFulfillmentConfigInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 10; extras go to remaining.
Fields of InitializePhoenixFulfillmentConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | base_ | Pubkey |
| 1 | quote_ | Pubkey |
| 2 | state | Pubkey |
| 3 | phoenix_ | Pubkey |
| 4 | phoenix_ | Pubkey |
| 5 | drift_ | Pubkey |
| 6 | phoenix_ | Pubkey |
| 7 | admin | Pubkey |
| 8 | rent | Pubkey |
| 9 | system_ | Pubkey |
| 10… | remaining | Vec< |
InitializePredictionMarket#
Discriminator f846c6e0e0697dc3 · data InitializePredictionMarket · accounts InitializePredictionMarketInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of InitializePredictionMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
InitializePrelaunchOracle#
Discriminator a9b25419af3e1df7 · data InitializePrelaunchOracle · accounts InitializePrelaunchOracleInstructionAccounts.
| Field | Type |
|---|---|
params | PrelaunchOracleParams |
Required accounts: 5; extras go to remaining.
Fields of InitializePrelaunchOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | prelaunch_ | Pubkey |
| 2 | state | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeProtectedMakerModeConfig#
Discriminator 4367dc435820fc08 · data InitializeProtectedMakerModeConfig · accounts InitializeProtectedMakerModeConfigInstructionAccounts.
| Field | Type |
|---|---|
max_users | u32 |
Required accounts: 5; extras go to remaining.
Fields of InitializeProtectedMakerModeConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | protected_ | Pubkey |
| 2 | state | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializePythLazerOracle#
Discriminator 8c6b21d6ebdb6714 · data InitializePythLazerOracle · accounts InitializePythLazerOracleInstructionAccounts.
| Field | Type |
|---|---|
feed_id | u32 |
Required accounts: 5; extras go to remaining.
Fields of InitializePythLazerOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lazer_ | Pubkey |
| 2 | state | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializePythPullOracle#
Discriminator f98cfdf3f84af0ee · data InitializePythPullOracle · accounts InitializePythPullOracleInstructionAccounts.
| Field | Type |
|---|---|
feed_id | [u8; 32] |
Required accounts: 5; extras go to remaining.
Fields of InitializePythPullOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | pyth_ | Pubkey |
| 2 | price_feed | Pubkey |
| 3 | system_ | Pubkey |
| 4 | state | Pubkey |
| 5… | remaining | Vec< |
InitializeReferrerName#
Discriminator eb7ee70a2aa41a3d · data InitializeReferrerName · accounts InitializeReferrerNameInstructionAccounts.
| Field | Type |
|---|---|
name | [u8; 32] |
Required accounts: 7; extras go to remaining.
Fields of InitializeReferrerNameInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | referrer_ | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | payer | Pubkey |
| 5 | rent | Pubkey |
| 6 | system_ | Pubkey |
| 7… | remaining | Vec< |
InitializeRevenueShare#
Discriminator 39097b835234320d · data InitializeRevenueShare · accounts InitializeRevenueShareInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of InitializeRevenueShareInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | revenue_ | Pubkey |
| 1 | authority | Pubkey |
| 2 | payer | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeRevenueShareEscrow#
Discriminator bb127b58ee68549a · data InitializeRevenueShareEscrow · accounts InitializeRevenueShareEscrowInstructionAccounts.
| Field | Type |
|---|---|
num_orders | u16 |
Required accounts: 7; extras go to remaining.
Fields of InitializeRevenueShareEscrowInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | escrow | Pubkey |
| 1 | authority | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | state | Pubkey |
| 4 | payer | Pubkey |
| 5 | rent | Pubkey |
| 6 | system_ | Pubkey |
| 7… | remaining | Vec< |
InitializeSerumFulfillmentConfig#
Discriminator c1d384ac46ab075e · data InitializeSerumFulfillmentConfig · accounts InitializeSerumFulfillmentConfigInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 11; extras go to remaining.
Fields of InitializeSerumFulfillmentConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | base_ | Pubkey |
| 1 | quote_ | Pubkey |
| 2 | state | Pubkey |
| 3 | serum_ | Pubkey |
| 4 | serum_ | Pubkey |
| 5 | serum_ | Pubkey |
| 6 | drift_ | Pubkey |
| 7 | serum_ | Pubkey |
| 8 | admin | Pubkey |
| 9 | rent | Pubkey |
| 10 | system_ | Pubkey |
| 11… | remaining | Vec< |
InitializeSignedMsgUserOrders#
Discriminator a4639c7e9c3963b4 · data InitializeSignedMsgUserOrders · accounts InitializeSignedMsgUserOrdersInstructionAccounts.
| Field | Type |
|---|---|
num_orders | u16 |
Required accounts: 5; extras go to remaining.
Fields of InitializeSignedMsgUserOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signed_ | Pubkey |
| 1 | authority | Pubkey |
| 2 | payer | Pubkey |
| 3 | rent | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
InitializeSignedMsgWsDelegates#
Discriminator 288460dbb8c15008 · data InitializeSignedMsgWsDelegates · accounts InitializeSignedMsgWsDelegatesInstructionAccounts.
| Field | Type |
|---|---|
delegates | Vec<Pubkey> |
Required accounts: 4; extras go to remaining.
Fields of InitializeSignedMsgWsDelegatesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signed_ | Pubkey |
| 1 | authority | Pubkey |
| 2 | rent | Pubkey |
| 3 | system_ | Pubkey |
| 4… | remaining | Vec< |
InitializeSpotMarket#
Discriminator eac4802c5e0f30c9 · data InitializeSpotMarket · accounts InitializeSpotMarketInstructionAccounts.
| Field | Type |
|---|---|
optimal_ | u32 |
optimal_ | u32 |
max_ | u32 |
oracle_ | OracleSource |
initial_ | u32 |
maintenance_ | u32 |
initial_ | u32 |
maintenance_ | u32 |
imf_factor | u32 |
liquidator_ | u32 |
if_ | u32 |
active_ | bool |
asset_tier | AssetTier |
scale_ | u64 |
withdraw_ | u64 |
order_ | u64 |
order_ | u64 |
if_ | u32 |
name | [u8; 32] |
Required accounts: 11; extras go to remaining.
Fields of InitializeSpotMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | spot_market | Pubkey |
| 1 | spot_ | Pubkey |
| 2 | spot_ | Pubkey |
| 3 | insurance_ | Pubkey |
| 4 | drift_ | Pubkey |
| 5 | state | Pubkey |
| 6 | oracle | Pubkey |
| 7 | admin | Pubkey |
| 8 | rent | Pubkey |
| 9 | system_ | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
InitializeUser#
Discriminator 6f11b9fa3c7a26fe · data InitializeUser · accounts InitializeUserInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
name | [u8; 32] |
Required accounts: 7; extras go to remaining.
Fields of InitializeUserInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | state | Pubkey |
| 3 | authority | Pubkey |
| 4 | payer | Pubkey |
| 5 | rent | Pubkey |
| 6 | system_ | Pubkey |
| 7… | remaining | Vec< |
InitializeUserStats#
Discriminator fef34862fb82a8d5 · data InitializeUserStats · accounts InitializeUserStatsInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of InitializeUserStatsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user_stats | Pubkey |
| 1 | state | Pubkey |
| 2 | authority | Pubkey |
| 3 | payer | Pubkey |
| 4 | rent | Pubkey |
| 5 | system_ | Pubkey |
| 6… | remaining | Vec< |
LiquidateBorrowForPerpPnl#
Discriminator a911205acf94d11b · data LiquidateBorrowForPerpPnl · accounts LiquidateBorrowForPerpPnlInstructionAccounts.
| Field | Type |
|---|---|
perp_ | u16 |
spot_ | u16 |
liquidator_ | u128 |
limit_price | Option<u64> |
Required accounts: 6; extras go to remaining.
Fields of LiquidateBorrowForPerpPnlInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
LiquidatePerp#
Discriminator 4b2377f7bf128b02 · data LiquidatePerp · accounts LiquidatePerpInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
liquidator_ | u64 |
limit_price | Option<u64> |
Required accounts: 6; extras go to remaining.
Fields of LiquidatePerpInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
LiquidatePerpPnlForDeposit#
Discriminator ed4bc6ebe9ba4b23 · data LiquidatePerpPnlForDeposit · accounts LiquidatePerpPnlForDepositInstructionAccounts.
| Field | Type |
|---|---|
perp_ | u16 |
spot_ | u16 |
liquidator_ | u128 |
limit_price | Option<u64> |
Required accounts: 6; extras go to remaining.
Fields of LiquidatePerpPnlForDepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
LiquidatePerpWithFill#
Discriminator 5f6f7c6956a9bb22 · data LiquidatePerpWithFill · accounts LiquidatePerpWithFillInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 6; extras go to remaining.
Fields of LiquidatePerpWithFillInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
LiquidateSpot#
Discriminator 6b00802923e5fb12 · data LiquidateSpot · accounts LiquidateSpotInstructionAccounts.
| Field | Type |
|---|---|
asset_ | u16 |
liability_ | u16 |
liquidator_ | u128 |
limit_price | Option<u64> |
Required accounts: 6; extras go to remaining.
Fields of LiquidateSpotInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6… | remaining | Vec< |
LiquidateSpotWithSwapBegin#
Discriminator 0c2bb0539cfb750d · data LiquidateSpotWithSwapBegin · accounts LiquidateSpotWithSwapBeginInstructionAccounts.
| Field | Type |
|---|---|
asset_ | u16 |
liability_ | u16 |
swap_amount | u64 |
Required accounts: 13; extras go to remaining.
Fields of LiquidateSpotWithSwapBeginInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6 | liability_ | Pubkey |
| 7 | asset_ | Pubkey |
| 8 | liability_ | Pubkey |
| 9 | asset_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | drift_ | Pubkey |
| 12 | instructions | Pubkey |
| 13… | remaining | Vec< |
LiquidateSpotWithSwapEnd#
Discriminator 8e58a3a0df4b37e1 · data LiquidateSpotWithSwapEnd · accounts LiquidateSpotWithSwapEndInstructionAccounts.
| Field | Type |
|---|---|
asset_ | u16 |
liability_ | u16 |
Required accounts: 13; extras go to remaining.
Fields of LiquidateSpotWithSwapEndInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6 | liability_ | Pubkey |
| 7 | asset_ | Pubkey |
| 8 | liability_ | Pubkey |
| 9 | asset_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | drift_ | Pubkey |
| 12 | instructions | Pubkey |
| 13… | remaining | Vec< |
LogUserBalances#
Discriminator a21523fb2039a1d2 · data LogUserBalances · accounts LogUserBalancesInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of LogUserBalancesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | user | Pubkey |
| 3… | remaining | Vec< |
LpPoolAddLiquidity#
Discriminator 3187f6675d92dc8d · data LpPoolAddLiquidity · accounts LpPoolAddLiquidityInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
in_amount | u128 |
min_ | u64 |
Required accounts: 12; extras go to remaining.
Fields of LpPoolAddLiquidityInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | authority | Pubkey |
| 3 | in_ | Pubkey |
| 4 | in_ | Pubkey |
| 5 | user_ | Pubkey |
| 6 | constituent_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | lp_mint | Pubkey |
| 9 | constituent_ | Pubkey |
| 10 | lp_ | Pubkey |
| 11 | token_ | Pubkey |
| 12… | remaining | Vec< |
LpPoolRemoveLiquidity#
Discriminator a424c1fcc49d8a2b · data LpPoolRemoveLiquidity · accounts LpPoolRemoveLiquidityInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
in_amount | u64 |
min_ | u128 |
Required accounts: 15; extras go to remaining.
Fields of LpPoolRemoveLiquidityInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | drift_ | Pubkey |
| 2 | lp_pool | Pubkey |
| 3 | authority | Pubkey |
| 4 | out_ | Pubkey |
| 5 | out_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | constituent_ | Pubkey |
| 8 | user_ | Pubkey |
| 9 | spot_ | Pubkey |
| 10 | lp_mint | Pubkey |
| 11 | constituent_ | Pubkey |
| 12 | lp_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | amm_cache | Pubkey |
| 15… | remaining | Vec< |
LpPoolSwap#
Discriminator 24a12731e30123e2 · data LpPoolSwap · accounts LpPoolSwapInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
in_amount | u64 |
min_ | u64 |
Required accounts: 14; extras go to remaining.
Fields of LpPoolSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | constituent_ | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | constituent_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | in_ | Pubkey |
| 9 | out_ | Pubkey |
| 10 | in_ | Pubkey |
| 11 | out_ | Pubkey |
| 12 | authority | Pubkey |
| 13 | token_ | Pubkey |
| 14… | remaining | Vec< |
ModifyOrder#
Discriminator 2f7c75ffc9c5825e · data ModifyOrder · accounts ModifyOrderInstructionAccounts.
| Field | Type |
|---|---|
order_id | Option<u32> |
modify_ | ModifyOrderParams |
Required accounts: 3; extras go to remaining.
Fields of ModifyOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
ModifyOrderByUserId#
Discriminator 9e4d04fdfcc2a1b3 · data ModifyOrderByUserId · accounts ModifyOrderByUserIdInstructionAccounts.
| Field | Type |
|---|---|
user_ | u8 |
modify_ | ModifyOrderParams |
Required accounts: 3; extras go to remaining.
Fields of ModifyOrderByUserIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
MoveAmmPrice#
Discriminator eb6d0252db76069f · data MoveAmmPrice · accounts MoveAmmPriceInstructionAccounts.
| Field | Type |
|---|---|
base_ | u128 |
quote_ | u128 |
sqrt_k | u128 |
Required accounts: 3; extras go to remaining.
Fields of MoveAmmPriceInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
OpenbookV2FulfillmentConfigStatus#
Discriminator 19ad13bd04d340ee · data OpenbookV2FulfillmentConfigStatus · accounts OpenbookV2FulfillmentConfigStatusInstructionAccounts.
| Field | Type |
|---|---|
status | SpotFulfillmentConfigStatus |
Required accounts: 3; extras go to remaining.
Fields of OpenbookV2FulfillmentConfigStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | openbook_ | Pubkey |
| 2 | admin | Pubkey |
| 3… | remaining | Vec< |
OverrideAmmCacheInfo#
Discriminator bdc680093191c973 · data OverrideAmmCacheInfo · accounts OverrideAmmCacheInfoInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
override_ | OverrideAmmCacheParams |
Required accounts: 3; extras go to remaining.
Fields of OverrideAmmCacheInfoInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | amm_cache | Pubkey |
| 3… | remaining | Vec< |
PauseSpotMarketDepositWithdraw#
Discriminator b7773baa8923f256 · data PauseSpotMarketDepositWithdraw · accounts PauseSpotMarketDepositWithdrawInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of PauseSpotMarketDepositWithdrawInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | keeper | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | spot_ | Pubkey |
| 4… | remaining | Vec< |
PhoenixFulfillmentConfigStatus#
Discriminator 601f71200ccb079a · data PhoenixFulfillmentConfigStatus · accounts PhoenixFulfillmentConfigStatusInstructionAccounts.
| Field | Type |
|---|---|
status | SpotFulfillmentConfigStatus |
Required accounts: 3; extras go to remaining.
Fields of PhoenixFulfillmentConfigStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | phoenix_ | Pubkey |
| 2 | admin | Pubkey |
| 3… | remaining | Vec< |
PlaceAndMakePerpOrder#
Discriminator 95750bed2f5f59ed · data PlaceAndMakePerpOrder · accounts PlaceAndMakePerpOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
taker_ | u32 |
Required accounts: 6; extras go to remaining.
Fields of PlaceAndMakePerpOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | taker | Pubkey |
| 4 | taker_stats | Pubkey |
| 5 | authority | Pubkey |
| 6… | remaining | Vec< |
PlaceAndMakeSignedMsgPerpOrder#
Discriminator 101a7b835e1daf62 · data PlaceAndMakeSignedMsgPerpOrder · accounts PlaceAndMakeSignedMsgPerpOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
signed_ | [u8; 8] |
Required accounts: 7; extras go to remaining.
Fields of PlaceAndMakeSignedMsgPerpOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | taker | Pubkey |
| 4 | taker_stats | Pubkey |
| 5 | taker_ | Pubkey |
| 6 | authority | Pubkey |
| 7… | remaining | Vec< |
PlaceAndMakeSpotOrder#
Discriminator 959e5542ef09f362 · data PlaceAndMakeSpotOrder · accounts PlaceAndMakeSpotOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
taker_ | u32 |
fulfillment_ | Option< |
Required accounts: 6; extras go to remaining.
Fields of PlaceAndMakeSpotOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | taker | Pubkey |
| 4 | taker_stats | Pubkey |
| 5 | authority | Pubkey |
| 6… | remaining | Vec< |
PlaceAndTakePerpOrder#
Discriminator d53301bb6cdce6e0 · data PlaceAndTakePerpOrder · accounts PlaceAndTakePerpOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
success_ | Option<u32> |
Required accounts: 4; extras go to remaining.
Fields of PlaceAndTakePerpOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4… | remaining | Vec< |
PlaceAndTakeSpotOrder#
Discriminator bf038a4772c6ca64 · data PlaceAndTakeSpotOrder · accounts PlaceAndTakeSpotOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
fulfillment_ | Option< |
maker_ | Option<u32> |
Required accounts: 4; extras go to remaining.
Fields of PlaceAndTakeSpotOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4… | remaining | Vec< |
PlaceOrders#
Discriminator 3c3f327b0cc53cbe · data PlaceOrders · accounts PlaceOrdersInstructionAccounts.
| Field | Type |
|---|---|
params | Vec< |
Required accounts: 3; extras go to remaining.
Fields of PlaceOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
PlacePerpOrder#
Discriminator 45a15dca787e4cb9 · data PlacePerpOrder · accounts PlacePerpOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
Required accounts: 3; extras go to remaining.
Fields of PlacePerpOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
PlaceScaleOrders#
Discriminator 81f94637b1fafc5e · data PlaceScaleOrders · accounts PlaceScaleOrdersInstructionAccounts.
| Field | Type |
|---|---|
params | ScaleOrderParams |
Required accounts: 3; extras go to remaining.
Fields of PlaceScaleOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
PlaceSignedMsgTakerOrder#
Discriminator 204f658b1906620f · data PlaceSignedMsgTakerOrder · accounts PlaceSignedMsgTakerOrderInstructionAccounts.
| Field | Type |
|---|---|
signed_ | Vec<u8> |
is_ | bool |
Required accounts: 6; extras go to remaining.
Fields of PlaceSignedMsgTakerOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | signed_ | Pubkey |
| 4 | authority | Pubkey |
| 5 | ix_sysvar | Pubkey |
| 6… | remaining | Vec< |
PlaceSpotOrder#
Discriminator 2d4f51a0f85a5bdc · data PlaceSpotOrder · accounts PlaceSpotOrderInstructionAccounts.
| Field | Type |
|---|---|
params | OrderParams |
Required accounts: 3; extras go to remaining.
Fields of PlaceSpotOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
PostMultiPythPullOracleUpdatesAtomic#
Discriminator f34fcce4e3d064f4 · data PostMultiPythPullOracleUpdatesAtomic · accounts PostMultiPythPullOracleUpdatesAtomicInstructionAccounts.
| Field | Type |
|---|---|
params | Vec<u8> |
Required accounts: 3; extras go to remaining.
Fields of PostMultiPythPullOracleUpdatesAtomicInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | pyth_ | Pubkey |
| 2 | guardian_ | Pubkey |
| 3… | remaining | Vec< |
PostPythLazerOracleUpdate#
Discriminator daedaaf5278fa621 · data PostPythLazerOracleUpdate · accounts PostPythLazerOracleUpdateInstructionAccounts.
| Field | Type |
|---|---|
pyth_ | Vec<u8> |
Required accounts: 3; extras go to remaining.
Fields of PostPythLazerOracleUpdateInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | pyth_ | Pubkey |
| 2 | ix_sysvar | Pubkey |
| 3… | remaining | Vec< |
PostPythPullOracleUpdateAtomic#
Discriminator 747a899ee0c3ad77 · data PostPythPullOracleUpdateAtomic · accounts PostPythPullOracleUpdateAtomicInstructionAccounts.
| Field | Type |
|---|---|
feed_id | [u8; 32] |
params | Vec<u8> |
Required accounts: 4; extras go to remaining.
Fields of PostPythPullOracleUpdateAtomicInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | pyth_ | Pubkey |
| 2 | guardian_ | Pubkey |
| 3 | price_feed | Pubkey |
| 4… | remaining | Vec< |
RecenterPerpMarketAmm#
Discriminator 18570a73a5be508b · data RecenterPerpMarketAmm · accounts RecenterPerpMarketAmmInstructionAccounts.
| Field | Type |
|---|---|
peg_ | u128 |
sqrt_k | u128 |
Required accounts: 3; extras go to remaining.
Fields of RecenterPerpMarketAmmInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
RecenterPerpMarketAmmCrank#
Discriminator a613400a0e33657a · data RecenterPerpMarketAmmCrank · accounts RecenterPerpMarketAmmCrankInstructionAccounts.
| Field | Type |
|---|---|
depth | Option< |
Required accounts: 5; extras go to remaining.
Fields of RecenterPerpMarketAmmCrankInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | spot_market | Pubkey |
| 4 | oracle | Pubkey |
| 5… | remaining | Vec< |
ReclaimRent#
Discriminator dac813c5e359c016 · data ReclaimRent · accounts ReclaimRentInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of ReclaimRentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | state | Pubkey |
| 3 | authority | Pubkey |
| 4 | rent | Pubkey |
| 5… | remaining | Vec< |
RemoveAmmConstituentMappingData#
Discriminator 14b7d3a21034e573 · data RemoveAmmConstituentMappingData · accounts RemoveAmmConstituentMappingDataInstructionAccounts.
| Field | Type |
|---|---|
perp_ | u16 |
constituent_ | u16 |
Required accounts: 5; extras go to remaining.
Fields of RemoveAmmConstituentMappingDataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | amm_ | Pubkey |
| 3 | system_ | Pubkey |
| 4 | state | Pubkey |
| 5… | remaining | Vec< |
RemoveInsuranceFundStake#
Discriminator 80a68e09febb8fae · data RemoveInsuranceFundStake · accounts RemoveInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 9; extras go to remaining.
Fields of RemoveInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | insurance_ | Pubkey |
| 3 | user_stats | Pubkey |
| 4 | authority | Pubkey |
| 5 | insurance_ | Pubkey |
| 6 | drift_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
RepegAmmCurve#
Discriminator 03246659b48078d5 · data RepegAmmCurve · accounts RepegAmmCurveInstructionAccounts.
| Field | Type |
|---|---|
new_ | u128 |
Required accounts: 4; extras go to remaining.
Fields of RepegAmmCurveInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3 | admin | Pubkey |
| 4… | remaining | Vec< |
RequestRemoveInsuranceFundStake#
Discriminator 8e46cc5c496ab434 · data RequestRemoveInsuranceFundStake · accounts RequestRemoveInsuranceFundStakeInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 5; extras go to remaining.
Fields of RequestRemoveInsuranceFundStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | spot_market | Pubkey |
| 1 | insurance_ | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | insurance_ | Pubkey |
| 5… | remaining | Vec< |
ResetFuelSeason#
Discriminator c77ac0ff20633fc8 · data ResetFuelSeason · accounts ResetFuelSeasonInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ResetFuelSeasonInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user_stats | Pubkey |
| 1 | authority | Pubkey |
| 2 | state | Pubkey |
| 3 | admin | Pubkey |
| 4… | remaining | Vec< |
ResetPerpMarketAmmOracleTwap#
Discriminator 7f0a37a47be22f18 · data ResetPerpMarketAmmOracleTwap · accounts ResetPerpMarketAmmOracleTwapInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ResetPerpMarketAmmOracleTwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3 | admin | Pubkey |
| 4… | remaining | Vec< |
ResizeRevenueShareEscrowOrders#
Discriminator 207cf7e197d5e126 · data ResizeRevenueShareEscrowOrders · accounts ResizeRevenueShareEscrowOrdersInstructionAccounts.
| Field | Type |
|---|---|
num_orders | u16 |
Required accounts: 4; extras go to remaining.
Fields of ResizeRevenueShareEscrowOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | escrow | Pubkey |
| 1 | authority | Pubkey |
| 2 | payer | Pubkey |
| 3 | system_ | Pubkey |
| 4… | remaining | Vec< |
ResizeSignedMsgUserOrders#
Discriminator 890a579612734fa8 · data ResizeSignedMsgUserOrders · accounts ResizeSignedMsgUserOrdersInstructionAccounts.
| Field | Type |
|---|---|
num_orders | u16 |
Required accounts: 5; extras go to remaining.
Fields of ResizeSignedMsgUserOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signed_ | Pubkey |
| 1 | authority | Pubkey |
| 2 | user | Pubkey |
| 3 | payer | Pubkey |
| 4 | system_ | Pubkey |
| 5… | remaining | Vec< |
ResolvePerpBankruptcy#
Discriminator e010b0d6a2d5b7de · data ResolvePerpBankruptcy · accounts ResolvePerpBankruptcyInstructionAccounts.
| Field | Type |
|---|---|
quote_ | u16 |
market_ | u16 |
Required accounts: 10; extras go to remaining.
Fields of ResolvePerpBankruptcyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6 | spot_ | Pubkey |
| 7 | insurance_ | Pubkey |
| 8 | drift_ | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
ResolvePerpPnlDeficit#
Discriminator a8cc44969f7e5f94 · data ResolvePerpPnlDeficit · accounts ResolvePerpPnlDeficitInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
perp_ | u16 |
Required accounts: 6; extras go to remaining.
Fields of ResolvePerpPnlDeficitInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | spot_ | Pubkey |
| 3 | insurance_ | Pubkey |
| 4 | drift_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
ResolveSpotBankruptcy#
Discriminator 7cc2f0fec6d5347a · data ResolveSpotBankruptcy · accounts ResolveSpotBankruptcyInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 10; extras go to remaining.
Fields of ResolveSpotBankruptcyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | liquidator | Pubkey |
| 3 | liquidator_ | Pubkey |
| 4 | user | Pubkey |
| 5 | user_stats | Pubkey |
| 6 | spot_ | Pubkey |
| 7 | insurance_ | Pubkey |
| 8 | drift_ | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
RevertFill#
Discriminator eceeb045ef0ab5c1 · data RevertFill · accounts RevertFillInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of RevertFillInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | filler_ | Pubkey |
| 4… | remaining | Vec< |
SettleExpiredMarket#
Discriminator 78590b197a4d48c1 · data SettleExpiredMarket · accounts SettleExpiredMarketInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of SettleExpiredMarketInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
SettleExpiredMarketPoolsToRevenuePool#
Discriminator 3713eea9e35ac8b8 · data SettleExpiredMarketPoolsToRevenuePool · accounts SettleExpiredMarketPoolsToRevenuePoolInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of SettleExpiredMarketPoolsToRevenuePoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | perp_market | Pubkey |
| 4… | remaining | Vec< |
SettleFundingPayment#
Discriminator de5aca5e1c2d73b7 · data SettleFundingPayment · accounts SettleFundingPaymentInstructionAccounts.
No data fields.
Required accounts: 2; extras go to remaining.
Fields of SettleFundingPaymentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2… | remaining | Vec< |
SettleMultiplePnls#
Discriminator 7f4275392832987f · data SettleMultiplePnls · accounts SettleMultiplePnlsInstructionAccounts.
| Field | Type |
|---|---|
market_ | Vec<u16> |
mode | SettlePnlMode |
Required accounts: 4; extras go to remaining.
Fields of SettleMultiplePnlsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3 | spot_ | Pubkey |
| 4… | remaining | Vec< |
SettlePerpToLpPool#
Discriminator 05622ebc0a3b02f9 · data SettlePerpToLpPool · accounts SettlePerpToLpPoolInstructionAccounts.
No data fields.
Required accounts: 10; extras go to remaining.
Fields of SettlePerpToLpPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | keeper | Pubkey |
| 3 | amm_cache | Pubkey |
| 4 | quote_ | Pubkey |
| 5 | constituent | Pubkey |
| 6 | constituent_ | Pubkey |
| 7 | quote_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | drift_ | Pubkey |
| 10… | remaining | Vec< |
SettlePnl#
Discriminator 2b3dea2d0f5f9899 · data SettlePnl · accounts SettlePnlInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 4; extras go to remaining.
Fields of SettlePnlInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3 | spot_ | Pubkey |
| 4… | remaining | Vec< |
SettleRevenueToInsuranceFund#
Discriminator c8785d884526c79f · data SettleRevenueToInsuranceFund · accounts SettleRevenueToInsuranceFundInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
Required accounts: 6; extras go to remaining.
Fields of SettleRevenueToInsuranceFundInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | spot_ | Pubkey |
| 3 | drift_ | Pubkey |
| 4 | insurance_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
SetUserStatusToBeingLiquidated#
Discriminator 6a85a0cec1abc0c2 · data SetUserStatusToBeingLiquidated · accounts SetUserStatusToBeingLiquidatedInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of SetUserStatusToBeingLiquidatedInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3… | remaining | Vec< |
SweepFuel#
Discriminator af6b1338a5f12b45 · data SweepFuel · accounts SweepFuelInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of SweepFuelInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | fuel_ | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | authority | Pubkey |
| 3 | signer | Pubkey |
| 4… | remaining | Vec< |
TransferDeposit#
Discriminator 141493df293fcc6f · data TransferDeposit · accounts TransferDepositInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 6; extras go to remaining.
Fields of TransferDepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | from_user | Pubkey |
| 1 | to_user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | state | Pubkey |
| 5 | spot_ | Pubkey |
| 6… | remaining | Vec< |
TransferIsolatedPerpPositionDeposit#
Discriminator c983f2e455e246ed · data TransferIsolatedPerpPositionDeposit · accounts TransferIsolatedPerpPositionDepositInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
perp_ | u16 |
amount | i64 |
Required accounts: 5; extras go to remaining.
Fields of TransferIsolatedPerpPositionDepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_stats | Pubkey |
| 2 | authority | Pubkey |
| 3 | state | Pubkey |
| 4 | spot_ | Pubkey |
| 5… | remaining | Vec< |
TransferPerpPosition#
Discriminator 17acbca886d2036c · data TransferPerpPosition · accounts TransferPerpPositionInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | Option<i64> |
Required accounts: 5; extras go to remaining.
Fields of TransferPerpPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | from_user | Pubkey |
| 1 | to_user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | state | Pubkey |
| 5… | remaining | Vec< |
TransferPools#
Discriminator c5679a196b5a3c5e · data TransferPools · accounts TransferPoolsInstructionAccounts.
| Field | Type |
|---|---|
deposit_ | u16 |
deposit_ | u16 |
borrow_ | u16 |
borrow_ | u16 |
deposit_ | Option<u64> |
borrow_ | Option<u64> |
Required accounts: 10; extras go to remaining.
Fields of TransferPoolsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | from_user | Pubkey |
| 1 | to_user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | state | Pubkey |
| 5 | deposit_ | Pubkey |
| 6 | deposit_ | Pubkey |
| 7 | borrow_ | Pubkey |
| 8 | borrow_ | Pubkey |
| 9 | drift_ | Pubkey |
| 10… | remaining | Vec< |
TransferProtocolIfSharesToRevenuePool#
Discriminator ec88939992cd681d · data TransferProtocolIfSharesToRevenuePool · accounts TransferProtocolIfSharesToRevenuePoolInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
Required accounts: 7; extras go to remaining.
Fields of TransferProtocolIfSharesToRevenuePoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | insurance_ | Pubkey |
| 3 | spot_ | Pubkey |
| 4 | if_ | Pubkey |
| 5 | token_ | Pubkey |
| 6 | drift_ | Pubkey |
| 7… | remaining | Vec< |
TriggerOrder#
Discriminator 3f7033e9e82ff0c7 · data TriggerOrder · accounts TriggerOrderInstructionAccounts.
| Field | Type |
|---|---|
order_id | u32 |
Required accounts: 4; extras go to remaining.
Fields of TriggerOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | user | Pubkey |
| 4… | remaining | Vec< |
UpdateAdmin#
Discriminator a1b028d53cb8b3e4 · data UpdateAdmin · accounts UpdateAdminInstructionAccounts.
| Field | Type |
|---|---|
admin | Pubkey |
Required accounts: 2; extras go to remaining.
Fields of UpdateAdminInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateAmmCache#
Discriminator 58043f5e53e0ff82 · data UpdateAmmCache · accounts UpdateAmmCacheInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of UpdateAmmCacheInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | state | Pubkey |
| 2 | amm_cache | Pubkey |
| 3 | quote_ | Pubkey |
| 4… | remaining | Vec< |
UpdateAmmConstituentMappingData#
Discriminator 544621a7856b3b18 · data UpdateAmmConstituentMappingData · accounts UpdateAmmConstituentMappingDataInstructionAccounts.
| Field | Type |
|---|---|
amm_ | Vec< |
Required accounts: 5; extras go to remaining.
Fields of UpdateAmmConstituentMappingDataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | amm_ | Pubkey |
| 3 | system_ | Pubkey |
| 4 | state | Pubkey |
| 5… | remaining | Vec< |
UpdateAmmJitIntensity#
Discriminator b5bf356da6f9378e · data UpdateAmmJitIntensity · accounts UpdateAmmJitIntensityInstructionAccounts.
| Field | Type |
|---|---|
amm_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateAmmJitIntensityInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdateAmms#
Discriminator c96ad9fd04afe461 · data UpdateAmms · accounts UpdateAmmsInstructionAccounts.
| Field | Type |
|---|---|
market_ | Vec<u16> |
Required accounts: 2; extras go to remaining.
Fields of UpdateAmmsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateConstituentCorrelationData#
Discriminator 4f0e1349dd6a3e6d · data UpdateConstituentCorrelationData · accounts UpdateConstituentCorrelationDataInstructionAccounts.
| Field | Type |
|---|---|
index1 | u16 |
index2 | u16 |
correlation | i64 |
Required accounts: 4; extras go to remaining.
Fields of UpdateConstituentCorrelationDataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | constituent_ | Pubkey |
| 3 | state | Pubkey |
| 4… | remaining | Vec< |
UpdateConstituentOracleInfo#
Discriminator c675e7fa93217fa1 · data UpdateConstituentOracleInfo · accounts UpdateConstituentOracleInfoInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of UpdateConstituentOracleInfoInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | keeper | Pubkey |
| 2 | constituent | Pubkey |
| 3 | spot_market | Pubkey |
| 4 | oracle | Pubkey |
| 5… | remaining | Vec< |
UpdateConstituentParams#
Discriminator ee827a1f0c68c07a · data UpdateConstituentParams · accounts UpdateConstituentParamsInstructionAccounts.
| Field | Type |
|---|---|
constituent_ | ConstituentParams |
Required accounts: 5; extras go to remaining.
Fields of UpdateConstituentParamsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | lp_pool | Pubkey |
| 1 | constituent_ | Pubkey |
| 2 | admin | Pubkey |
| 3 | state | Pubkey |
| 4 | constituent | Pubkey |
| 5… | remaining | Vec< |
UpdateConstituentPausedOperations#
Discriminator b97a99bf83b184d0 · data UpdateConstituentPausedOperations · accounts UpdateConstituentPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
paused_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateConstituentPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | constituent | Pubkey |
| 3… | remaining | Vec< |
UpdateConstituentStatus#
Discriminator 4c9fd3efb6d6060f · data UpdateConstituentStatus · accounts UpdateConstituentStatusInstructionAccounts.
| Field | Type |
|---|---|
new_status | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateConstituentStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | constituent | Pubkey |
| 3… | remaining | Vec< |
UpdateDelegateUserGovTokenInsuranceStake#
Discriminator f11dd7e48e7416a0 · data UpdateDelegateUserGovTokenInsuranceStake · accounts UpdateDelegateUserGovTokenInsuranceStakeInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of UpdateDelegateUserGovTokenInsuranceStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | spot_market | Pubkey |
| 1 | insurance_ | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | admin | Pubkey |
| 4 | insurance_ | Pubkey |
| 5 | state | Pubkey |
| 6… | remaining | Vec< |
UpdateDiscountMint#
Discriminator 20fc7ad3421f2ff1 · data UpdateDiscountMint · accounts UpdateDiscountMintInstructionAccounts.
| Field | Type |
|---|---|
discount_ | Pubkey |
Required accounts: 2; extras go to remaining.
Fields of UpdateDiscountMintInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateExchangeStatus#
Discriminator 53a0fcfa817431df · data UpdateExchangeStatus · accounts UpdateExchangeStatusInstructionAccounts.
| Field | Type |
|---|---|
exchange_ | u8 |
Required accounts: 2; extras go to remaining.
Fields of UpdateExchangeStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsBuilderCodes#
Discriminator 0180b133ad2d0b66 · data UpdateFeatureBitFlagsBuilderCodes · accounts UpdateFeatureBitFlagsBuilderCodesInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsBuilderCodesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsMedianTriggerPrice#
Discriminator 40b9dd2d57930c13 · data UpdateFeatureBitFlagsMedianTriggerPrice · accounts UpdateFeatureBitFlagsMedianTriggerPriceInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsMedianTriggerPriceInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsMintRedeemLpPool#
Discriminator 1a0b8e7ace9f092d · data UpdateFeatureBitFlagsMintRedeemLpPool · accounts UpdateFeatureBitFlagsMintRedeemLpPoolInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsMintRedeemLpPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsMmOracle#
Discriminator da8621bae73b8295 · data UpdateFeatureBitFlagsMmOracle · accounts UpdateFeatureBitFlagsMmOracleInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsMmOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsSettleLpPool#
Discriminator ba1c4ee69b53f21a · data UpdateFeatureBitFlagsSettleLpPool · accounts UpdateFeatureBitFlagsSettleLpPoolInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsSettleLpPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFeatureBitFlagsSwapLpPool#
Discriminator 5310960c6603163a · data UpdateFeatureBitFlagsSwapLpPool · accounts UpdateFeatureBitFlagsSwapLpPoolInstructionAccounts.
| Field | Type |
|---|---|
enable | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateFeatureBitFlagsSwapLpPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateFundingRate#
Discriminator c9b274d4a69048ee · data UpdateFundingRate · accounts UpdateFundingRateInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdateFundingRateInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3… | remaining | Vec< |
UpdateHighLeverageModeConfig#
Discriminator 407ad45d8dd9ca37 · data UpdateHighLeverageModeConfig · accounts UpdateHighLeverageModeConfigInstructionAccounts.
| Field | Type |
|---|---|
max_users | u32 |
reduce_only | bool |
current_ | Option<u32> |
Required accounts: 3; extras go to remaining.
Fields of UpdateHighLeverageModeConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | high_ | Pubkey |
| 2 | state | Pubkey |
| 3… | remaining | Vec< |
UpdateIfRebalanceConfig#
Discriminator 8ef5f942f9b51653 · data UpdateIfRebalanceConfig · accounts UpdateIfRebalanceConfigInstructionAccounts.
| Field | Type |
|---|---|
params | IfRebalanceConfigParams |
Required accounts: 3; extras go to remaining.
Fields of UpdateIfRebalanceConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | if_ | Pubkey |
| 2 | state | Pubkey |
| 3… | remaining | Vec< |
UpdateInitialAmmCacheInfo#
Discriminator 9dd26d43d4aa0c6b · data UpdateInitialAmmCacheInfo · accounts UpdateInitialAmmCacheInfoInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of UpdateInitialAmmCacheInfoInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | amm_cache | Pubkey |
| 3… | remaining | Vec< |
UpdateInitialPctToLiquidate#
Discriminator d285e180c2320d6d · data UpdateInitialPctToLiquidate · accounts UpdateInitialPctToLiquidateInstructionAccounts.
| Field | Type |
|---|---|
initial_ | u16 |
Required accounts: 2; extras go to remaining.
Fields of UpdateInitialPctToLiquidateInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateInsuranceFundUnstakingPeriod#
Discriminator 2c452be2ccdfca34 · data UpdateInsuranceFundUnstakingPeriod · accounts UpdateInsuranceFundUnstakingPeriodInstructionAccounts.
| Field | Type |
|---|---|
insurance_ | i64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateInsuranceFundUnstakingPeriodInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateK#
Discriminator 4862098b81e5ac38 · data UpdateK · accounts UpdateKInstructionAccounts.
| Field | Type |
|---|---|
sqrt_k | u128 |
Required accounts: 4; extras go to remaining.
Fields of UpdateKInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | oracle | Pubkey |
| 4… | remaining | Vec< |
UpdateLiquidationDuration#
Discriminator 1c9a14f966c04947 · data UpdateLiquidationDuration · accounts UpdateLiquidationDurationInstructionAccounts.
| Field | Type |
|---|---|
liquidation_ | u8 |
Required accounts: 2; extras go to remaining.
Fields of UpdateLiquidationDurationInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateLiquidationMarginBufferRatio#
Discriminator 84e0f3a09a5261d7 · data UpdateLiquidationMarginBufferRatio · accounts UpdateLiquidationMarginBufferRatioInstructionAccounts.
| Field | Type |
|---|---|
liquidation_ | u32 |
Required accounts: 2; extras go to remaining.
Fields of UpdateLiquidationMarginBufferRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateLpConstituentTargetBase#
Discriminator 9d4132cf3beca16e · data UpdateLpConstituentTargetBase · accounts UpdateLpConstituentTargetBaseInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of UpdateLpConstituentTargetBaseInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | keeper | Pubkey |
| 2 | amm_ | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | amm_cache | Pubkey |
| 5 | lp_pool | Pubkey |
| 6… | remaining | Vec< |
UpdateLpPoolAum#
Discriminator 587189cef6f7ab8e · data UpdateLpPoolAum · accounts UpdateLpPoolAumInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of UpdateLpPoolAumInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | keeper | Pubkey |
| 2 | lp_pool | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | amm_cache | Pubkey |
| 5… | remaining | Vec< |
UpdateLpPoolParams#
Discriminator d95c02ff1ba7b251 · data UpdateLpPoolParams · accounts UpdateLpPoolParamsInstructionAccounts.
| Field | Type |
|---|---|
lp_ | LpPoolParams |
Required accounts: 3; extras go to remaining.
Fields of UpdateLpPoolParamsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | lp_pool | Pubkey |
| 1 | admin | Pubkey |
| 2 | state | Pubkey |
| 3… | remaining | Vec< |
UpdateOracleGuardRails#
Discriminator 83700a3b203628a4 · data UpdateOracleGuardRails · accounts UpdateOracleGuardRailsInstructionAccounts.
| Field | Type |
|---|---|
oracle_ | OracleGuardRails |
Required accounts: 2; extras go to remaining.
Fields of UpdateOracleGuardRailsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdatePerpAuctionDuration#
Discriminator 7e6e34ae1eced75a · data UpdatePerpAuctionDuration · accounts UpdatePerpAuctionDurationInstructionAccounts.
| Field | Type |
|---|---|
min_ | u8 |
Required accounts: 2; extras go to remaining.
Fields of UpdatePerpAuctionDurationInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdatePerpBidAskTwap#
Discriminator f717ff41d45addc2 · data UpdatePerpBidAskTwap · accounts UpdatePerpBidAskTwapInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of UpdatePerpBidAskTwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3 | keeper_ | Pubkey |
| 4 | authority | Pubkey |
| 5… | remaining | Vec< |
UpdatePerpFeeStructure#
Discriminator 17b26fcb49168c4b · data UpdatePerpFeeStructure · accounts UpdatePerpFeeStructureInstructionAccounts.
| Field | Type |
|---|---|
fee_ | FeeStructure |
Required accounts: 2; extras go to remaining.
Fields of UpdatePerpFeeStructureInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdatePerpMarketAmmOracleTwap#
Discriminator f14a727bce9918ca · data UpdatePerpMarketAmmOracleTwap · accounts UpdatePerpMarketAmmOracleTwapInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of UpdatePerpMarketAmmOracleTwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3 | admin | Pubkey |
| 4… | remaining | Vec< |
UpdatePerpMarketAmmSpreadAdjustment#
Discriminator 9bc3952bdc52adcd · data UpdatePerpMarketAmmSpreadAdjustment · accounts UpdatePerpMarketAmmSpreadAdjustmentInstructionAccounts.
| Field | Type |
|---|---|
amm_ | i8 |
amm_ | i8 |
reference_ | i32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketAmmSpreadAdjustmentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketAmmSummaryStats#
Discriminator 7a65f9eed109f1f5 · data UpdatePerpMarketAmmSummaryStats · accounts UpdatePerpMarketAmmSummaryStatsInstructionAccounts.
| Field | Type |
|---|---|
params | UpdatePerpMarketSummaryStatsParams |
Required accounts: 5; extras go to remaining.
Fields of UpdatePerpMarketAmmSummaryStatsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | spot_market | Pubkey |
| 4 | oracle | Pubkey |
| 5… | remaining | Vec< |
UpdatePerpMarketBaseSpread#
Discriminator 475f54a8099dc641 · data UpdatePerpMarketBaseSpread · accounts UpdatePerpMarketBaseSpreadInstructionAccounts.
| Field | Type |
|---|---|
base_spread | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketBaseSpreadInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketConcentrationCoef#
Discriminator 184ee87ea9b0e610 · data UpdatePerpMarketConcentrationCoef · accounts UpdatePerpMarketConcentrationCoefInstructionAccounts.
| Field | Type |
|---|---|
concentration_ | u128 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketConcentrationCoefInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketConfig#
Discriminator 865a062250a05ef5 · data UpdatePerpMarketConfig · accounts UpdatePerpMarketConfigInstructionAccounts.
| Field | Type |
|---|---|
market_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketContractTier#
Discriminator ec800f5fcbd64475 · data UpdatePerpMarketContractTier · accounts UpdatePerpMarketContractTierInstructionAccounts.
| Field | Type |
|---|---|
contract_ | ContractTier |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketContractTierInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketCurveUpdateIntensity#
Discriminator 3283069ce2e7bd48 · data UpdatePerpMarketCurveUpdateIntensity · accounts UpdatePerpMarketCurveUpdateIntensityInstructionAccounts.
| Field | Type |
|---|---|
curve_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketCurveUpdateIntensityInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketExpiry#
Discriminator 2cdde397838c166e · data UpdatePerpMarketExpiry · accounts UpdatePerpMarketExpiryInstructionAccounts.
| Field | Type |
|---|---|
expiry_ts | i64 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketExpiryInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketFeeAdjustment#
Discriminator c2ae57662b942070 · data UpdatePerpMarketFeeAdjustment · accounts UpdatePerpMarketFeeAdjustmentInstructionAccounts.
| Field | Type |
|---|---|
fee_ | i16 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketFeeAdjustmentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketFundingPeriod#
Discriminator aba1455b818ba11c · data UpdatePerpMarketFundingPeriod · accounts UpdatePerpMarketFundingPeriodInstructionAccounts.
| Field | Type |
|---|---|
funding_ | i64 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketFundingPeriodInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketHighLeverageMarginRatio#
Discriminator 5870563118744a9d · data UpdatePerpMarketHighLeverageMarginRatio · accounts UpdatePerpMarketHighLeverageMarginRatioInstructionAccounts.
| Field | Type |
|---|---|
margin_ | u16 |
margin_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketHighLeverageMarginRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketImfFactor#
Discriminator cfc23884234347f4 · data UpdatePerpMarketImfFactor · accounts UpdatePerpMarketImfFactorInstructionAccounts.
| Field | Type |
|---|---|
imf_factor | u32 |
unrealized_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketImfFactorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketLiquidationFee#
Discriminator 5a89099129089475 · data UpdatePerpMarketLiquidationFee · accounts UpdatePerpMarketLiquidationFeeInstructionAccounts.
| Field | Type |
|---|---|
liquidator_ | u32 |
if_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketLiquidationFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketLpPoolFeeTransferScalar#
Discriminator 5ee4ed6d64b90451 · data UpdatePerpMarketLpPoolFeeTransferScalar · accounts UpdatePerpMarketLpPoolFeeTransferScalarInstructionAccounts.
| Field | Type |
|---|---|
optional_ | Option<u8> |
optional_ | Option<u8> |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketLpPoolFeeTransferScalarInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketLpPoolId#
Discriminator 77d09a58a55c15bc · data UpdatePerpMarketLpPoolId · accounts UpdatePerpMarketLpPoolIdInstructionAccounts.
| Field | Type |
|---|---|
lp_pool_id | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketLpPoolIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketLpPoolPausedOperations#
Discriminator b55e5d9233592087 · data UpdatePerpMarketLpPoolPausedOperations · accounts UpdatePerpMarketLpPoolPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketLpPoolPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketLpPoolStatus#
Discriminator 4306fc3d365859e9 · data UpdatePerpMarketLpPoolStatus · accounts UpdatePerpMarketLpPoolStatusInstructionAccounts.
| Field | Type |
|---|---|
lp_status | u8 |
Required accounts: 4; extras go to remaining.
Fields of UpdatePerpMarketLpPoolStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | amm_cache | Pubkey |
| 4… | remaining | Vec< |
UpdatePerpMarketMarginRatio#
Discriminator 82ad6b2d77691a71 · data UpdatePerpMarketMarginRatio · accounts UpdatePerpMarketMarginRatioInstructionAccounts.
| Field | Type |
|---|---|
margin_ | u32 |
margin_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMarginRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMaxFillReserveFraction#
Discriminator 13ac729a2a87a185 · data UpdatePerpMarketMaxFillReserveFraction · accounts UpdatePerpMarketMaxFillReserveFractionInstructionAccounts.
| Field | Type |
|---|---|
max_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMaxFillReserveFractionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMaxImbalances#
Discriminator 0fce49853c085659 · data UpdatePerpMarketMaxImbalances · accounts UpdatePerpMarketMaxImbalancesInstructionAccounts.
| Field | Type |
|---|---|
unrealized_ | u64 |
max_ | u64 |
quote_ | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMaxImbalancesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMaxOpenInterest#
Discriminator c24f95e0f666ba8c · data UpdatePerpMarketMaxOpenInterest · accounts UpdatePerpMarketMaxOpenInterestInstructionAccounts.
| Field | Type |
|---|---|
max_ | u128 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMaxOpenInterestInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMaxSlippageRatio#
Discriminator eb2528c4469236c9 · data UpdatePerpMarketMaxSlippageRatio · accounts UpdatePerpMarketMaxSlippageRatioInstructionAccounts.
| Field | Type |
|---|---|
max_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMaxSlippageRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMaxSpread#
Discriminator 50fc7a3e28da5b64 · data UpdatePerpMarketMaxSpread · accounts UpdatePerpMarketMaxSpreadInstructionAccounts.
| Field | Type |
|---|---|
max_spread | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMaxSpreadInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketMinOrderSize#
Discriminator e24a05596cdf2e8d · data UpdatePerpMarketMinOrderSize · accounts UpdatePerpMarketMinOrderSizeInstructionAccounts.
| Field | Type |
|---|---|
order_size | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketMinOrderSizeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketName#
Discriminator d31f15d2406c42c9 · data UpdatePerpMarketName · accounts UpdatePerpMarketNameInstructionAccounts.
| Field | Type |
|---|---|
name | [u8; 32] |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketNameInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketNumberOfUsers#
Discriminator 233e90b1b43ed7c4 · data UpdatePerpMarketNumberOfUsers · accounts UpdatePerpMarketNumberOfUsersInstructionAccounts.
| Field | Type |
|---|---|
number_ | Option<u32> |
number_ | Option<u32> |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketNumberOfUsersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketOracle#
Discriminator b6716fa043ae59bf · data UpdatePerpMarketOracle · accounts UpdatePerpMarketOracleInstructionAccounts.
| Field | Type |
|---|---|
oracle | Pubkey |
oracle_ | OracleSource |
skip_ | bool |
Required accounts: 6; extras go to remaining.
Fields of UpdatePerpMarketOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | oracle | Pubkey |
| 4 | old_oracle | Pubkey |
| 5 | amm_cache | Pubkey |
| 6… | remaining | Vec< |
UpdatePerpMarketOracleLowRiskSlotDelayOverride#
Discriminator 7c6c93e56d757b03 · data UpdatePerpMarketOracleLowRiskSlotDelayOverride · accounts UpdatePerpMarketOracleLowRiskSlotDelayOverrideInstructionAccounts.
| Field | Type |
|---|---|
oracle_ | i8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketOracleLowRiskSlotDelayOverrideInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketOracleSlotDelayOverride#
Discriminator a55befe33face308 · data UpdatePerpMarketOracleSlotDelayOverride · accounts UpdatePerpMarketOracleSlotDelayOverrideInstructionAccounts.
| Field | Type |
|---|---|
oracle_ | i8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketOracleSlotDelayOverrideInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketPausedOperations#
Discriminator 351088841edc7955 · data UpdatePerpMarketPausedOperations · accounts UpdatePerpMarketPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
paused_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketPnlPool#
Discriminator 32caf9e0a6b80d8f · data UpdatePerpMarketPnlPool · accounts UpdatePerpMarketPnlPoolInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 5; extras go to remaining.
Fields of UpdatePerpMarketPnlPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | spot_ | Pubkey |
| 4 | perp_market | Pubkey |
| 5… | remaining | Vec< |
UpdatePerpMarketProtectedMakerParams#
Discriminator f9d57322fdef4bad · data UpdatePerpMarketProtectedMakerParams · accounts UpdatePerpMarketProtectedMakerParamsInstructionAccounts.
| Field | Type |
|---|---|
protected_ | Option<u8> |
protected_ | Option<u8> |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketProtectedMakerParamsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketReferencePriceOffsetDeadbandPct#
Discriminator d649a60bda4c6ea3 · data UpdatePerpMarketReferencePriceOffsetDeadbandPct · accounts UpdatePerpMarketReferencePriceOffsetDeadbandPctInstructionAccounts.
| Field | Type |
|---|---|
reference_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketReferencePriceOffsetDeadbandPctInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketStatus#
Discriminator 47c9af7affcfc4cf · data UpdatePerpMarketStatus · accounts UpdatePerpMarketStatusInstructionAccounts.
| Field | Type |
|---|---|
status | MarketStatus |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketStepSizeAndTickSize#
Discriminator e7ff6119928bae04 · data UpdatePerpMarketStepSizeAndTickSize · accounts UpdatePerpMarketStepSizeAndTickSizeInstructionAccounts.
| Field | Type |
|---|---|
step_size | u64 |
tick_size | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketStepSizeAndTickSizeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePerpMarketUnrealizedAssetWeight#
Discriminator 8784cda56d96a66a · data UpdatePerpMarketUnrealizedAssetWeight · accounts UpdatePerpMarketUnrealizedAssetWeightInstructionAccounts.
| Field | Type |
|---|---|
unrealized_ | u32 |
unrealized_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdatePerpMarketUnrealizedAssetWeightInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
UpdatePrelaunchOracle#
Discriminator dc841b1be9dc3ddb · data UpdatePrelaunchOracle · accounts UpdatePrelaunchOracleInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of UpdatePrelaunchOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | perp_market | Pubkey |
| 2 | oracle | Pubkey |
| 3… | remaining | Vec< |
UpdatePrelaunchOracleParams#
Discriminator 62cd93f3124b53cf · data UpdatePrelaunchOracleParams · accounts UpdatePrelaunchOracleParamsInstructionAccounts.
| Field | Type |
|---|---|
params | PrelaunchOracleParams |
Required accounts: 4; extras go to remaining.
Fields of UpdatePrelaunchOracleParamsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | prelaunch_ | Pubkey |
| 2 | perp_market | Pubkey |
| 3 | state | Pubkey |
| 4… | remaining | Vec< |
UpdateProtectedMakerModeConfig#
Discriminator 56a6ebfd43cadf11 · data UpdateProtectedMakerModeConfig · accounts UpdateProtectedMakerModeConfigInstructionAccounts.
| Field | Type |
|---|---|
max_users | u32 |
reduce_only | bool |
current_ | Option<u32> |
Required accounts: 3; extras go to remaining.
Fields of UpdateProtectedMakerModeConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | protected_ | Pubkey |
| 2 | state | Pubkey |
| 3… | remaining | Vec< |
UpdatePythPullOracle#
Discriminator e6bfbd5e6c3b4ac5 · data UpdatePythPullOracle · accounts UpdatePythPullOracleInstructionAccounts.
| Field | Type |
|---|---|
feed_id | [u8; 32] |
params | Vec<u8> |
Required accounts: 4; extras go to remaining.
Fields of UpdatePythPullOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | pyth_ | Pubkey |
| 2 | encoded_vaa | Pubkey |
| 3 | price_feed | Pubkey |
| 4… | remaining | Vec< |
UpdateSerumFulfillmentConfigStatus#
Discriminator ab6df0fb5f019559 · data UpdateSerumFulfillmentConfigStatus · accounts UpdateSerumFulfillmentConfigStatusInstructionAccounts.
| Field | Type |
|---|---|
status | SpotFulfillmentConfigStatus |
Required accounts: 3; extras go to remaining.
Fields of UpdateSerumFulfillmentConfigStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | serum_ | Pubkey |
| 2 | admin | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotAuctionDuration#
Discriminator b6b2cb48bb8f9d6b · data UpdateSpotAuctionDuration · accounts UpdateSpotAuctionDurationInstructionAccounts.
| Field | Type |
|---|---|
default_ | u8 |
Required accounts: 2; extras go to remaining.
Fields of UpdateSpotAuctionDurationInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateSpotFeeStructure#
Discriminator 61d8698371f68e8d · data UpdateSpotFeeStructure · accounts UpdateSpotFeeStructureInstructionAccounts.
| Field | Type |
|---|---|
fee_ | FeeStructure |
Required accounts: 2; extras go to remaining.
Fields of UpdateSpotFeeStructureInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateSpotMarketAssetTier#
Discriminator fdd1e70ef2d0f382 · data UpdateSpotMarketAssetTier · accounts UpdateSpotMarketAssetTierInstructionAccounts.
| Field | Type |
|---|---|
asset_tier | AssetTier |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketAssetTierInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketBorrowRate#
Discriminator 47efec99d23efe4c · data UpdateSpotMarketBorrowRate · accounts UpdateSpotMarketBorrowRateInstructionAccounts.
| Field | Type |
|---|---|
optimal_ | u32 |
optimal_ | u32 |
max_ | u32 |
min_ | Option<u8> |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketBorrowRateInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketCumulativeInterest#
Discriminator 27a68bf39ea59be1 · data UpdateSpotMarketCumulativeInterest · accounts UpdateSpotMarketCumulativeInterestInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of UpdateSpotMarketCumulativeInterestInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | oracle | Pubkey |
| 3 | spot_ | Pubkey |
| 4… | remaining | Vec< |
UpdateSpotMarketExpiry#
Discriminator d00bd39fe2180bf7 · data UpdateSpotMarketExpiry · accounts UpdateSpotMarketExpiryInstructionAccounts.
| Field | Type |
|---|---|
expiry_ts | i64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketExpiryInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketFeeAdjustment#
Discriminator 94b6037e9d72dc63 · data UpdateSpotMarketFeeAdjustment · accounts UpdateSpotMarketFeeAdjustmentInstructionAccounts.
| Field | Type |
|---|---|
fee_ | i16 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketFeeAdjustmentInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketIfFactor#
Discriminator 931ee02212e66904 · data UpdateSpotMarketIfFactor · accounts UpdateSpotMarketIfFactorInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
user_ | u32 |
total_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketIfFactorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketIfPausedOperations#
Discriminator 65d74f4a3b294f0c · data UpdateSpotMarketIfPausedOperations · accounts UpdateSpotMarketIfPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
paused_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketIfPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketLiquidationFee#
Discriminator 0b0dff35388868b1 · data UpdateSpotMarketLiquidationFee · accounts UpdateSpotMarketLiquidationFeeInstructionAccounts.
| Field | Type |
|---|---|
liquidator_ | u32 |
if_ | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketLiquidationFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketMarginWeights#
Discriminator 6d2157c3ff240651 · data UpdateSpotMarketMarginWeights · accounts UpdateSpotMarketMarginWeightsInstructionAccounts.
| Field | Type |
|---|---|
initial_ | u32 |
maintenance_ | u32 |
initial_ | u32 |
maintenance_ | u32 |
imf_factor | u32 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketMarginWeightsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketMaxTokenBorrows#
Discriminator 3966ccd4fd5f0dc7 · data UpdateSpotMarketMaxTokenBorrows · accounts UpdateSpotMarketMaxTokenBorrowsInstructionAccounts.
| Field | Type |
|---|---|
max_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketMaxTokenBorrowsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketMaxTokenDeposits#
Discriminator 38bf4f121a7950d0 · data UpdateSpotMarketMaxTokenDeposits · accounts UpdateSpotMarketMaxTokenDepositsInstructionAccounts.
| Field | Type |
|---|---|
max_ | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketMaxTokenDepositsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketMinOrderSize#
Discriminator 5d800b771a14b532 · data UpdateSpotMarketMinOrderSize · accounts UpdateSpotMarketMinOrderSizeInstructionAccounts.
| Field | Type |
|---|---|
order_size | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketMinOrderSizeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketName#
Discriminator 11d00101a2d3bce0 · data UpdateSpotMarketName · accounts UpdateSpotMarketNameInstructionAccounts.
| Field | Type |
|---|---|
name | [u8; 32] |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketNameInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketOracle#
Discriminator 72b86625f6bab463 · data UpdateSpotMarketOracle · accounts UpdateSpotMarketOracleInstructionAccounts.
| Field | Type |
|---|---|
oracle | Pubkey |
oracle_ | OracleSource |
skip_ | bool |
Required accounts: 5; extras go to remaining.
Fields of UpdateSpotMarketOracleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3 | oracle | Pubkey |
| 4 | old_oracle | Pubkey |
| 5… | remaining | Vec< |
UpdateSpotMarketOrdersEnabled#
Discriminator be4fce0f1ae5e52b · data UpdateSpotMarketOrdersEnabled · accounts UpdateSpotMarketOrdersEnabledInstructionAccounts.
| Field | Type |
|---|---|
orders_ | bool |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketOrdersEnabledInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketPausedOperations#
Discriminator 643d9951b40c06f8 · data UpdateSpotMarketPausedOperations · accounts UpdateSpotMarketPausedOperationsInstructionAccounts.
| Field | Type |
|---|---|
paused_ | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketPausedOperationsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketPoolId#
Discriminator 16d5c5a08bc15195 · data UpdateSpotMarketPoolId · accounts UpdateSpotMarketPoolIdInstructionAccounts.
| Field | Type |
|---|---|
pool_id | u8 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketPoolIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketRevenueSettlePeriod#
Discriminator 515c7e29fae19cdb · data UpdateSpotMarketRevenueSettlePeriod · accounts UpdateSpotMarketRevenueSettlePeriodInstructionAccounts.
| Field | Type |
|---|---|
revenue_ | i64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketRevenueSettlePeriodInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketScaleInitialAssetWeightStart#
Discriminator d9cccc76cc82e193 · data UpdateSpotMarketScaleInitialAssetWeightStart · accounts UpdateSpotMarketScaleInitialAssetWeightStartInstructionAccounts.
| Field | Type |
|---|---|
scale_ | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketScaleInitialAssetWeightStartInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketStatus#
Discriminator 4e5e10bcc16ee71f · data UpdateSpotMarketStatus · accounts UpdateSpotMarketStatusInstructionAccounts.
| Field | Type |
|---|---|
status | MarketStatus |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateSpotMarketStepSizeAndTickSize#
Discriminator ee998950ce3bfa3d · data UpdateSpotMarketStepSizeAndTickSize · accounts UpdateSpotMarketStepSizeAndTickSizeInstructionAccounts.
| Field | Type |
|---|---|
step_size | u64 |
tick_size | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateSpotMarketStepSizeAndTickSizeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
UpdateStateMaxInitializeUserFee#
Discriminator ede119edc12d4d61 · data UpdateStateMaxInitializeUserFee · accounts UpdateStateMaxInitializeUserFeeInstructionAccounts.
| Field | Type |
|---|---|
max_ | u16 |
Required accounts: 2; extras go to remaining.
Fields of UpdateStateMaxInitializeUserFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateStateMaxNumberOfSubAccounts#
Discriminator 9b7bd602dda6cc55 · data UpdateStateMaxNumberOfSubAccounts · accounts UpdateStateMaxNumberOfSubAccountsInstructionAccounts.
| Field | Type |
|---|---|
max_ | u16 |
Required accounts: 2; extras go to remaining.
Fields of UpdateStateMaxNumberOfSubAccountsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateStateSettlementDuration#
Discriminator 6144c7eb83503dad · data UpdateStateSettlementDuration · accounts UpdateStateSettlementDurationInstructionAccounts.
| Field | Type |
|---|---|
settlement_ | u16 |
Required accounts: 2; extras go to remaining.
Fields of UpdateStateSettlementDurationInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2… | remaining | Vec< |
UpdateUserCustomMarginRatio#
Discriminator 15dd8cbb20810b7b · data UpdateUserCustomMarginRatio · accounts UpdateUserCustomMarginRatioInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
margin_ | u32 |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserCustomMarginRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserDelegate#
Discriminator 8bcd8d8d71245ebb · data UpdateUserDelegate · accounts UpdateUserDelegateInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
delegate | Pubkey |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserDelegateInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserGovTokenInsuranceStake#
Discriminator 8f63ebbb149fb854 · data UpdateUserGovTokenInsuranceStake · accounts UpdateUserGovTokenInsuranceStakeInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of UpdateUserGovTokenInsuranceStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | insurance_ | Pubkey |
| 3 | user_stats | Pubkey |
| 4 | signer | Pubkey |
| 5 | insurance_ | Pubkey |
| 6… | remaining | Vec< |
UpdateUserIdle#
Discriminator fd85431667a11464 · data UpdateUserIdle · accounts UpdateUserIdleInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of UpdateUserIdleInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | filler | Pubkey |
| 3 | user | Pubkey |
| 4… | remaining | Vec< |
UpdateUserMarginTradingEnabled#
Discriminator c25cccdff6bc1fcb · data UpdateUserMarginTradingEnabled · accounts UpdateUserMarginTradingEnabledInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
margin_ | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserMarginTradingEnabledInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserName#
Discriminator 8719b938a5352288 · data UpdateUserName · accounts UpdateUserNameInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
name | [u8; 32] |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserNameInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserPerpPositionCustomMarginRatio#
Discriminator 79899d9b59ba9171 · data UpdateUserPerpPositionCustomMarginRatio · accounts UpdateUserPerpPositionCustomMarginRatioInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
perp_ | u16 |
margin_ | u16 |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserPerpPositionCustomMarginRatioInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserPoolId#
Discriminator db56496a38da806d · data UpdateUserPoolId · accounts UpdateUserPoolIdInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
pool_id | u8 |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserPoolIdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserProtectedMakerOrders#
Discriminator 72277bc6bb195adb · data UpdateUserProtectedMakerOrders · accounts UpdateUserProtectedMakerOrdersInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
protected_ | bool |
Required accounts: 4; extras go to remaining.
Fields of UpdateUserProtectedMakerOrdersInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | authority | Pubkey |
| 3 | protected_ | Pubkey |
| 4… | remaining | Vec< |
UpdateUserQuoteAssetInsuranceStake#
Discriminator fb659c07023f1e17 · data UpdateUserQuoteAssetInsuranceStake · accounts UpdateUserQuoteAssetInsuranceStakeInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of UpdateUserQuoteAssetInsuranceStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | spot_market | Pubkey |
| 2 | insurance_ | Pubkey |
| 3 | user_stats | Pubkey |
| 4 | signer | Pubkey |
| 5 | insurance_ | Pubkey |
| 6… | remaining | Vec< |
UpdateUserReduceOnly#
Discriminator c7472a439013566d · data UpdateUserReduceOnly · accounts UpdateUserReduceOnlyInstructionAccounts.
| Field | Type |
|---|---|
sub_ | u16 |
reduce_only | bool |
Required accounts: 2; extras go to remaining.
Fields of UpdateUserReduceOnlyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | authority | Pubkey |
| 2… | remaining | Vec< |
UpdateUserStatsReferrerStatus#
Discriminator ae9a482abf9491cd · data UpdateUserStatsReferrerStatus · accounts UpdateUserStatsReferrerStatusInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of UpdateUserStatsReferrerStatusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | authority | Pubkey |
| 2 | user_stats | Pubkey |
| 3… | remaining | Vec< |
UpdateWithdrawGuardThreshold#
Discriminator 3812273d9bd32c85 · data UpdateWithdrawGuardThreshold · accounts UpdateWithdrawGuardThresholdInstructionAccounts.
| Field | Type |
|---|---|
withdraw_ | u64 |
Required accounts: 3; extras go to remaining.
Fields of UpdateWithdrawGuardThresholdInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | spot_market | Pubkey |
| 3… | remaining | Vec< |
ViewLpPoolAddLiquidityFees#
Discriminator 5042e2a1468e7754 · data ViewLpPoolAddLiquidityFees · accounts ViewLpPoolAddLiquidityFeesInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
in_amount | u128 |
Required accounts: 7; extras go to remaining.
Fields of ViewLpPoolAddLiquidityFeesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | authority | Pubkey |
| 3 | in_ | Pubkey |
| 4 | in_ | Pubkey |
| 5 | lp_mint | Pubkey |
| 6 | constituent_ | Pubkey |
| 7… | remaining | Vec< |
ViewLpPoolRemoveLiquidityFees#
Discriminator 2f0c09660ce2c559 · data ViewLpPoolRemoveLiquidityFees · accounts ViewLpPoolRemoveLiquidityFeesInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
in_amount | u64 |
Required accounts: 7; extras go to remaining.
Fields of ViewLpPoolRemoveLiquidityFeesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | lp_pool | Pubkey |
| 2 | authority | Pubkey |
| 3 | out_ | Pubkey |
| 4 | out_ | Pubkey |
| 5 | lp_mint | Pubkey |
| 6 | constituent_ | Pubkey |
| 7… | remaining | Vec< |
ViewLpPoolSwapFees#
Discriminator 7ebd6dbdaa9c032e · data ViewLpPoolSwapFees · accounts ViewLpPoolSwapFeesInstructionAccounts.
| Field | Type |
|---|---|
in_ | u16 |
out_ | u16 |
in_amount | u64 |
in_ | i64 |
out_ | i64 |
Required accounts: 11; extras go to remaining.
Fields of ViewLpPoolSwapFeesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | drift_ | Pubkey |
| 1 | state | Pubkey |
| 2 | lp_pool | Pubkey |
| 3 | constituent_ | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | constituent_ | Pubkey |
| 6 | constituent_ | Pubkey |
| 7 | in_ | Pubkey |
| 8 | out_ | Pubkey |
| 9 | authority | Pubkey |
| 10 | token_ | Pubkey |
| 11… | remaining | Vec< |
Withdraw#
Discriminator b712469c946da122 · data Withdraw · accounts WithdrawInstructionAccounts.
| Field | Type |
|---|---|
market_ | u16 |
amount | u64 |
reduce_only | bool |
Required accounts: 8; extras go to remaining.
Fields of WithdrawInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | spot_ | Pubkey |
| 5 | drift_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
WithdrawFromIsolatedPerpPosition#
Discriminator 255cb2958c4c9f87 · data WithdrawFromIsolatedPerpPosition · accounts WithdrawFromIsolatedPerpPositionInstructionAccounts.
| Field | Type |
|---|---|
spot_ | u16 |
perp_ | u16 |
amount | u64 |
Required accounts: 8; extras go to remaining.
Fields of WithdrawFromIsolatedPerpPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | user | Pubkey |
| 2 | user_stats | Pubkey |
| 3 | authority | Pubkey |
| 4 | spot_ | Pubkey |
| 5 | drift_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
WithdrawFromProgramVault#
Discriminator 7828b795e812e097 · data WithdrawFromProgramVault · accounts WithdrawFromProgramVaultInstructionAccounts.
| Field | Type |
|---|---|
amount | u64 |
Required accounts: 10; extras go to remaining.
Fields of WithdrawFromProgramVaultInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | state | Pubkey |
| 1 | admin | Pubkey |
| 2 | drift_ | Pubkey |
| 3 | constituent | Pubkey |
| 4 | constituent_ | Pubkey |
| 5 | spot_market | Pubkey |
| 6 | spot_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | mint | Pubkey |
| 9 | oracle | Pubkey |
| 10… | remaining | Vec< |
ZeroMmOracleFields#
Discriminator c0e227cccf7894fa · data ZeroMmOracleFields · accounts ZeroMmOracleFieldsInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of ZeroMmOracleFieldsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | state | Pubkey |
| 2 | perp_market | Pubkey |
| 3… | remaining | Vec< |
CpiEvent#
Anchor self-CPI that carries one of the program's events. data is the CpiEvent enum.
Discriminator e445a52e51cb9a1d · data CpiEvent · accounts CpiEventInstructionAccounts.
Required accounts: 2; extras go to remaining.
Fields of CpiEventInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | program | Pubkey |
| 1 | event_ | Pubkey |
| 2… | remaining | Vec< |
Accounts#
Variants of DriftV2Account. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
AmmCache#
Discriminator d572a1381416023b · accounts::.
| Field | Type |
|---|---|
bump | u8 |
padding | [u8; 3] |
cache | Vec< |
AmmConstituentMapping#
Discriminator fe5905ad4236d6f7 · accounts::.
| Field | Type |
|---|---|
lp_pool | Pubkey |
bump | u8 |
padding | [u8; 3] |
weights | Vec< |
Constituent#
Discriminator 003d2423b14cd8cd · accounts::.
| Field | Type | Description |
|---|---|---|
pubkey | Pubkey | address of the constituent |
mint | Pubkey | |
lp_pool | Pubkey | |
vault | Pubkey | |
total_ | i128 | total fees received by the constituent. Positive = fees received, Negative = fees paid |
spot_ | ConstituentSpotBalance | spot borrow-lend balance for constituent |
last_ | i64 | |
cumulative_ | i64 | |
max_ | i64 | max deviation from target_weight allowed for the constituent precision: PERCENTAGE_PRECISION |
swap_ | i64 | min fee charged on swaps to/from this constituent precision: PERCENTAGE_PRECISION |
swap_ | i64 | max fee charged on swaps to/from this constituent precision: PERCENTAGE_PRECISION |
max_ | u64 | Max Borrow amount: precision: token precision |
vault_ | u64 | ata token balance in token precision |
last_ | i64 | |
last_ | u64 | |
oracle_ | u64 | Delay allowed for valid AUM calculation |
flash_ | u64 | |
next_ | u64 | Every swap to/from this constituent has a monotonically increasing id. This is the next id to use |
derivative_ | u64 | percentable of derivatve weight to go to this specific derivative PERCENTAGE_PRECISION. Zero if no derivative weight |
volatility | u64 | |
constituent_ | u64 | |
constituent_ | i16 | The constituent_ of the parent constituent. -1 if it is a parent index Example: if in a pool with SOL (parent) and dSOL (derivative), SOL.constituent_index = 1, SOL.constituent_derivative_index = -1, dSOL.constituent_index = 2, dSOL.constituent_derivative_index = 1 |
spot_ | u16 | |
constituent_ | u16 | |
decimals | u8 | |
bump | u8 | |
vault_bump | u8 | |
gamma_ | u8 | |
gamma_ | u8 | |
xi | u8 | |
status | u8 | |
paused_ | u8 | |
padding | [u8; 162] |
ConstituentCorrelations#
Discriminator 7ccb732112a243d8 · accounts::.
| Field | Type |
|---|---|
lp_pool | Pubkey |
bump | u8 |
padding | [u8; 3] |
correlations | Vec<i64> |
ConstituentTargetBase#
Discriminator ff8e86477d42c663 · accounts::.
| Field | Type |
|---|---|
lp_pool | Pubkey |
bump | u8 |
padding | [u8; 3] |
targets | Vec< |
FuelOverflow#
Discriminator b640e7b1e28e453a · accounts::.
| Field | Type | Description |
|---|---|---|
authority | Pubkey | The authority of this overflow account |
fuel_ | u128 | |
fuel_ | u128 | |
fuel_ | u128 | |
fuel_ | u128 | |
fuel_taker | u128 | |
fuel_maker | u128 | |
last_ | u32 | |
last_ | u32 | |
padding | [u128; 6] |
HighLeverageModeConfig#
Discriminator 03c45abdc140e4ea · accounts::.
| Field | Type |
|---|---|
max_users | u32 |
current_ | u32 |
reduce_only | u8 |
padding1 | [u8; 3] |
current_ | u32 |
padding2 | [u8; 24] |
IfRebalanceConfig#
Discriminator d65428fb6b90adef · accounts::.
| Field | Type | Description |
|---|---|---|
pubkey | Pubkey | |
total_ | u64 | total amount to be sold |
current_ | u64 | amount already sold |
current_ | u64 | amount already bought |
current_ | u64 | amount already transferred to revenue pool |
current_ | u64 | amount already bought in epoch |
epoch_ | i64 | start time of epoch |
epoch_ | u64 | amount already bought in epoch |
epoch_ | u64 | max amount to swap in epoch |
epoch_ | i64 | duration of epoch |
out_ | u16 | market index to sell |
in_ | u16 | market index to buy |
max_ | u16 | |
swap_mode | u8 | |
status | u8 | |
padding2 | [u8; 32] |
InsuranceFundStake#
Discriminator 6eca0e2a5f495a5f · accounts::.
| Field | Type |
|---|---|
authority | Pubkey |
if_shares | u128 |
last_ | u128 |
if_base | u128 |
last_ | i64 |
last_ | u64 |
last_ | i64 |
cost_basis | i64 |
market_ | u16 |
padding | [u8; 14] |
LPPool#
Discriminator e4988de0a1aa0b59 · accounts::.
| Field | Type | Description |
|---|---|---|
pubkey | Pubkey | address of the vault. |
mint | Pubkey | |
whitelist_ | Pubkey | |
constituent_ | Pubkey | |
constituent_ | Pubkey | |
max_aum | u128 | The current number of VaultConstituents in the vault, each constituent is pda(LPPool.address, constituent_index) which constituent is the quote, receives revenue pool distributions. (maybe this should just be implied idx 0) pub quote_constituent_index: u16, QUOTE_PRECISION: Max AUM, Prohibit minting new DLP beyond this |
last_aum | u128 | QUOTE_PRECISION: AUM of the vault in USD, updated lazily |
cumulative_ | u128 | QUOTE PRECISION: Cumulative quotes from settles |
cumulative_ | u128 | |
total_ | i128 | QUOTE_PRECISION: Total fees paid for minting and redeeming LP tokens |
last_ | u64 | timestamp of last AUM slot |
max_ | u64 | |
_padding | u64 | timestamp of last vAMM revenue rebalance |
mint_ | u64 | Every mint/redeem has a monotonically increasing id. This is the next id to use |
settle_id | u64 | |
min_ | i64 | PERCENTAGE_PRECISION |
token_ | u64 | |
volatility | u64 | |
constituents | u16 | |
quote_ | u16 | |
bump | u8 | |
gamma_ | u8 | |
xi | u8 | |
target_ | u8 | |
target_ | u8 | |
lp_pool_id | u8 | |
padding | [u8; 174] |
OpenbookV2FulfillmentConfig#
Discriminator 032b3a6a8384c7ab · accounts::.
| Field | Type |
|---|---|
pubkey | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
openbook_ | Pubkey |
market_ | u16 |
fulfillment_ | SpotFulfillmentType |
status | SpotFulfillmentConfigStatus |
padding | [u8; 4] |
PerpMarket#
Discriminator 0adf0c2c6bf537f7 · accounts::.
| Field | Type | Description |
|---|---|---|
pubkey | Pubkey | The perp market's address. It is a pda of the market index |
amm | AMM | The automated market maker |
pnl_pool | PoolBalance | The market's pnl pool. When users settle negative pnl, the balance increases. When users settle positive pnl, the balance decreases. Can not go negative. |
name | [u8; 32] | Encoded display name for the perp market e.g. SOL-PERP |
insurance_ | InsuranceClaim | The perp market's claim on the insurance fund |
unrealized_ | u64 | The max pnl imbalance before positive pnl asset weight is discounted pnl imbalance is the difference between long and short pnl. When it's greater than 0, the amm has negative pnl and the initial asset weight for positive pnl is discounted precision = QUOTE_PRECISION |
expiry_ts | i64 | The ts when the market will be expired. Only set if market is in reduce only mode |
expiry_ | i64 | The price at which positions will be settled. Only set if market is expired precision = PRICE_PRECISION |
next_ | u64 | Every trade has a fill record id. This is the next id to be used |
next_ | u64 | Every funding rate update has a record id. This is the next id to be used |
next_ | u64 | Every amm k updated has a record id. This is the next id to be used |
imf_factor | u32 | The initial margin fraction factor. Used to increase margin ratio for large positions precision: MARGIN_PRECISION |
unrealized_ | u32 | The imf factor for unrealized pnl. Used to discount asset weight for large positive pnl precision: MARGIN_PRECISION |
liquidator_ | u32 | The fee the liquidator is paid for taking over perp position precision: LIQUIDATOR_FEE_PRECISION |
if_ | u32 | The fee the insurance fund receives from liquidation precision: LIQUIDATOR_FEE_PRECISION |
margin_ | u32 | The margin ratio which determines how much collateral is required to open a position e.g. margin ratio of .1 means a user must have $100 of total collateral to open a $1000 position precision: MARGIN_PRECISION |
margin_ | u32 | The margin ratio which determines when a user will be liquidated e.g. margin ratio of .05 means a user must have $50 of total collateral to maintain a $1000 position else they will be liquidated precision: MARGIN_PRECISION |
unrealized_ | u32 | The initial asset weight for positive pnl. Negative pnl always has an asset weight of 1 precision: SPOT_WEIGHT_PRECISION |
unrealized_ | u32 | The maintenance asset weight for positive pnl. Negative pnl always has an asset weight of 1 precision: SPOT_WEIGHT_PRECISION |
number_ | u32 | number of users in a position (base) |
number_ | u32 | number of users in a position (pnl) or pnl (quote) |
market_ | u16 | |
status | MarketStatus | Whether a market is active, reduce only, expired, etc Affects whether users can open/close positions |
contract_ | ContractType | Currently only Perpetual markets are supported |
contract_ | ContractTier | The contract tier determines how much insurance a market can receive, with more speculative markets receiving less insurance It also influences the order perp markets can be liquidated, with less speculative markets being liquidated first |
paused_ | u8 | |
quote_ | u16 | The spot market that pnl is settled in |
fee_ | i16 | Between -100 and 100, represents what % to increase/decrease the fee by E.g. if this is -50 and the fee is 5bps, the new fee will be 2.5bps if this is 50 and the fee is 5bps, the new fee will be 7.5bps |
fuel_ | u8 | fuel multiplier for perp funding precision: 10 |
fuel_ | u8 | fuel multiplier for perp taker precision: 10 |
fuel_ | u8 | fuel multiplier for perp maker precision: 10 |
pool_id | u8 | |
high_ | u16 | |
high_ | u16 | |
protected_ | u8 | |
protected_ | u8 | |
lp_ | u8 | |
lp_status | u8 | |
lp_ | u8 | |
lp_ | u8 | |
last_ | u64 | |
lp_pool_id | u8 | |
market_ | u8 | |
padding | [u8; 22] |
PhoenixV1FulfillmentConfig#
Discriminator e92d3e2823813048 · accounts::.
| Field | Type |
|---|---|
pubkey | Pubkey |
phoenix_ | Pubkey |
phoenix_ | Pubkey |
phoenix_ | Pubkey |
phoenix_ | Pubkey |
phoenix_ | Pubkey |
market_ | u16 |
fulfillment_ | SpotFulfillmentType |
status | SpotFulfillmentConfigStatus |
padding | [u8; 4] |
PrelaunchOracle#
Discriminator 5c0e8bea48f4441a · accounts::.
| Field | Type |
|---|---|
price | i64 |
max_price | i64 |
confidence | u64 |
last_ | u64 |
amm_ | u64 |
perp_ | u16 |
padding | [u8; 70] |
ProtectedMakerModeConfig#
Discriminator 2f565a09e0ff0a45 · accounts::.
| Field | Type |
|---|---|
max_users | u32 |
current_ | u32 |
reduce_only | u8 |
padding | [u8; 31] |
ProtocolIfSharesTransferConfig#
Discriminator bc01d56217941e01 · accounts::.
| Field | Type |
|---|---|
whitelisted_ | [Pubkey; 4] |
max_ | u128 |
current_ | u128 |
next_ | i64 |
padding | [u128; 8] |
PythLazerOracle#
Discriminator 9f07a1f922517985 · accounts::.
| Field | Type |
|---|---|
price | i64 |
publish_ | u64 |
posted_slot | u64 |
exponent | i32 |
padding | [u8; 4] |
conf | u64 |
ReferrerName#
Discriminator 6985aa6e342a1cb6 · accounts::.
| Field | Type |
|---|---|
authority | Pubkey |
user | Pubkey |
user_stats | Pubkey |
name | [u8; 32] |
RevenueShare#
Discriminator 3728e4078b34b46e · accounts::.
| Field | Type | Description |
|---|---|---|
authority | Pubkey | the owner of this account, a builder or referrer |
total_ | u64 | |
total_ | u64 | |
padding | [u8; 18] |
RevenueShareEscrow#
Discriminator 62a7032e4ab1adfc · accounts::.
| Field | Type | Description |
|---|---|---|
authority | Pubkey | the owner of this account, a user |
referrer | Pubkey | |
referrer_ | u32 | |
referrer_ | i8 | |
referee_ | i8 | |
referrer_ | i8 | |
reserved_ | [u8; 17] | |
padding0 | u32 | |
orders | Vec< | |
padding1 | u32 | |
approved_ | Vec< |
SerumV3FulfillmentConfig#
Discriminator 41a0c570efa867b9 · accounts::.
| Field | Type |
|---|---|
pubkey | Pubkey |
serum_ | Pubkey |
serum_ | Pubkey |
serum_ | Pubkey |
serum_ | Pubkey |
serum_bids | Pubkey |
serum_asks | Pubkey |
serum_ | Pubkey |
serum_ | Pubkey |
serum_ | Pubkey |
serum_ | u64 |
market_ | u16 |
fulfillment_ | SpotFulfillmentType |
status | SpotFulfillmentConfigStatus |
padding | [u8; 4] |
SignedMsgUserOrders#
From the program's IDL:
- This struct is a duplicate of SignedMsgUserOrdersZeroCopy
- It is used to give anchor an struct to generate the idl for clients
- The struct SignedMsgUserOrdersZeroCopy is used to load the data in efficiently
Discriminator 460632f8de018f31 · accounts::.
| Field | Type |
|---|---|
authority_ | Pubkey |
padding | u32 |
signed_ | Vec< |
SignedMsgWsDelegates#
From the program's IDL:
- Used to store authenticated delegates for swift-like ws connections
Discriminator be736f2cd8fc6c55 · accounts::.
| Field | Type |
|---|---|
delegates | Vec<Pubkey> |
SpotMarket#
Discriminator 64b1086ba8414127 · accounts::.
| Field | Type | Description |
|---|---|---|
pubkey | Pubkey | The address of the spot market. It is a pda of the market index |
oracle | Pubkey | The oracle used to price the markets deposits/borrows |
mint | Pubkey | The token mint of the market |
vault | Pubkey | The vault used to store the market's deposits The amount in the vault should be equal to or greater than deposits - borrows |
name | [u8; 32] | The encoded display name for the market e.g. SOL |
historical_ | HistoricalOracleData | |
historical_ | HistoricalIndexData | |
revenue_ | PoolBalance | Revenue the protocol has collected in this markets token e.g. for SOL-PERP, funds can be settled in usdc and will flow into the USDC revenue pool |
spot_ | PoolBalance | The fees collected from swaps between this market and the quote market Is settled to the quote markets revenue pool |
insurance_ | InsuranceFund | Details on the insurance fund covering bankruptcies in this markets token Covers bankruptcies for borrows with this markets token and perps settling in this markets token |
total_ | u128 | The total spot fees collected for this market precision: QUOTE_PRECISION |
deposit_ | u128 | The sum of the scaled balances for deposits across users and pool balances To convert to the deposit token amount, multiply by the cumulative deposit interest precision: SPOT_BALANCE_PRECISION |
borrow_ | u128 | The sum of the scaled balances for borrows across users and pool balances To convert to the borrow token amount, multiply by the cumulative borrow interest precision: SPOT_BALANCE_PRECISION |
cumulative_ | u128 | The cumulative interest earned by depositors Used to calculate the deposit token amount from the deposit balance precision: SPOT_CUMULATIVE_INTEREST_PRECISION |
cumulative_ | u128 | The cumulative interest earned by borrowers Used to calculate the borrow token amount from the borrow balance precision: SPOT_CUMULATIVE_INTEREST_PRECISION |
total_ | u128 | The total socialized loss from borrows, in the mint's token precision: token mint precision |
total_ | u128 | The total socialized loss from borrows, in the quote market's token preicision: QUOTE_PRECISION |
withdraw_ | u64 | no withdraw limits/guards when deposits below this threshold precision: token mint precision |
max_ | u64 | The max amount of token deposits in this market 0 if there is no limit precision: token mint precision |
deposit_ | u64 | 24hr average of deposit token amount precision: token mint precision |
borrow_ | u64 | 24hr average of borrow token amount precision: token mint precision |
utilization_ | u64 | 24hr average of utilization which is borrow amount over token amount precision: SPOT_UTILIZATION_PRECISION |
last_ | u64 | Last time the cumulative deposit and borrow interest was updated |
last_ | u64 | Last time the deposit/borrow/utilization averages were updated |
expiry_ts | i64 | The time the market is set to expire. Only set if market is in reduce only mode |
order_ | u64 | Spot orders must be a multiple of the step size precision: token mint precision |
order_ | u64 | Spot orders must be a multiple of the tick size precision: PRICE_PRECISION |
min_ | u64 | The minimum order size precision: token mint precision |
max_ | u64 | The maximum spot position size if the limit is 0, there is no limit precision: token mint precision |
next_ | u64 | Every spot trade has a fill record id. This is the next id to use |
next_ | u64 | Every deposit has a deposit record id. This is the next id to use |
initial_ | u32 | The initial asset weight used to calculate a deposits contribution to a users initial total collateral e.g. if the asset weight is .8, $100 of deposits contributes $80 to the users initial total collateral precision: SPOT_WEIGHT_PRECISION |
maintenance_ | u32 | The maintenance asset weight used to calculate a deposits contribution to a users maintenance total collateral e.g. if the asset weight is .9, $100 of deposits contributes $90 to the users maintenance total collateral precision: SPOT_WEIGHT_PRECISION |
initial_ | u32 | The initial liability weight used to calculate a borrows contribution to a users initial margin requirement e.g. if the liability weight is .9, $100 of borrows contributes $90 to the users initial margin requirement precision: SPOT_WEIGHT_PRECISION |
maintenance_ | u32 | The maintenance liability weight used to calculate a borrows contribution to a users maintenance margin requirement e.g. if the liability weight is .8, $100 of borrows contributes $80 to the users maintenance margin requirement precision: SPOT_WEIGHT_PRECISION |
imf_factor | u32 | The initial margin fraction factor. Used to increase liability weight/decrease asset weight for large positions precision: MARGIN_PRECISION |
liquidator_ | u32 | The fee the liquidator is paid for taking over borrow/deposit precision: LIQUIDATOR_FEE_PRECISION |
if_ | u32 | The fee the insurance fund receives from liquidation precision: LIQUIDATOR_FEE_PRECISION |
optimal_ | u32 | The optimal utilization rate for this market. Used to determine the markets borrow rate precision: SPOT_UTILIZATION_PRECISION |
optimal_ | u32 | The borrow rate for this market when the market has optimal utilization precision: SPOT_RATE_PRECISION |
max_ | u32 | The borrow rate for this market when the market has 1000 utilization precision: SPOT_RATE_PRECISION |
decimals | u32 | The market's token mint's decimals. To from decimals to a precision, 10^decimals |
market_ | u16 | |
orders_ | bool | Whether or not spot trading is enabled |
oracle_ | OracleSource | |
status | MarketStatus | |
asset_tier | AssetTier | The asset tier affects how a deposit can be used as collateral and the priority for a borrow being liquidated |
paused_ | u8 | |
if_ | u8 | |
fee_ | i16 | |
max_ | u16 | What fraction of max_token_deposits disabled when 0, 1 => 1/10000 => .01% of max_token_deposits precision: X/10000 |
flash_ | u64 | For swaps, the amount of token loaned out in the begin_swap ix precision: token mint precision |
flash_ | u64 | For swaps, the amount in the users token account in the begin_swap ix Used to calculate how much of the token left the system in end_swap ix precision: token mint precision |
total_ | u64 | The total fees received from swaps precision: token mint precision |
scale_ | u64 | When to begin scaling down the initial asset weight disabled when 0 precision: QUOTE_PRECISION |
min_ | u8 | The min borrow rate for this market when the market regardless of utilization 1 => 1/200 => .5% precision: X/200 |
fuel_ | u8 | fuel multiplier for spot deposits precision: 10 |
fuel_ | u8 | fuel multiplier for spot borrows precision: 10 |
fuel_ | u8 | fuel multiplier for spot taker precision: 10 |
fuel_ | u8 | fuel multiplier for spot maker precision: 10 |
fuel_ | u8 | fuel multiplier for spot insurance stake precision: 10 |
token_ | u8 | |
pool_id | u8 | |
padding | [u8; 40] |
State#
Discriminator d8926b5e684bb6b1 · accounts::.
| Field | Type |
|---|---|
admin | Pubkey |
whitelist_ | Pubkey |
discount_ | Pubkey |
signer | Pubkey |
srm_vault | Pubkey |
perp_ | FeeStructure |
spot_ | FeeStructure |
oracle_ | OracleGuardRails |
number_ | u64 |
number_ | u64 |
lp_ | u64 |
liquidation_ | u32 |
settlement_ | u16 |
number_ | u16 |
number_ | u16 |
signer_ | u8 |
min_ | u8 |
default_ | u8 |
default_ | u8 |
exchange_ | u8 |
liquidation_ | u8 |
initial_ | u16 |
max_ | u16 |
max_ | u16 |
feature_ | u8 |
lp_ | u8 |
padding | [u8; 8] |
User#
Discriminator 9f755fe3ef973aec · accounts::.
| Field | Type | Description |
|---|---|---|
authority | Pubkey | The owner/authority of the account |
delegate | Pubkey | An addresses that can control the account on the authority's behalf. Has limited power, cant withdraw |
name | [u8; 32] | Encoded display name e.g. "toly" |
spot_ | [SpotPosition; 8] | The user's spot positions |
perp_ | [PerpPosition; 8] | The user's perp positions |
orders | [Order; 32] | The user's orders |
last_ | i64 | The last time the user added perp lp positions |
total_ | u64 | The total values of deposits the user has made precision: QUOTE_PRECISION |
total_ | u64 | The total values of withdrawals the user has made precision: QUOTE_PRECISION |
total_ | u64 | The total socialized loss the users has incurred upon the protocol precision: QUOTE_PRECISION |
settled_ | i64 | Fees (taker fees, maker rebate, referrer reward, filler reward) and pnl for perps precision: QUOTE_PRECISION |
cumulative_ | i64 | Fees (taker fees, maker rebate, filler reward) for spot precision: QUOTE_PRECISION |
cumulative_ | i64 | Cumulative funding paid/received for perps precision: QUOTE_PRECISION |
liquidation_ | u64 | The amount of margin freed during liquidation. Used to force the liquidation to occur over a period of time Defaults to zero when not being liquidated precision: QUOTE_PRECISION |
last_ | u64 | The last slot a user was active. Used to determine if a user is idle |
next_ | u32 | Every user order has an order id. This is the next order id to be used |
max_ | u32 | Custom max initial margin ratio for the user |
next_ | u16 | The next liquidation id to be used for user |
sub_ | u16 | The sub account id for this user |
status | u8 | Whether the user is active, being liquidated or bankrupt |
is_ | bool | Whether the user has enabled margin trading |
idle | bool | User is idle if they haven't interacted with the protocol in 1 week and they have no orders, perp positions or borrows Off-chain keeper bots can ignore users that are idle |
open_orders | u8 | number of open orders |
has_ | bool | Whether or not user has open order |
open_ | u8 | number of open orders with auction |
has_ | bool | Whether or not user has open order with auction |
margin_mode | MarginMode | |
pool_id | u8 | |
padding1 | [u8; 3] | |
last_ | u32 | |
padding | [u8; 12] |
UserStats#
Discriminator b0df881b7a4f20e3 · accounts::.
| Field | Type | Description |
|---|---|---|
authority | Pubkey | The authority for all of a users sub accounts |
referrer | Pubkey | The address that referred this user |
fees | UserFees | Stats on the fees paid by the user |
next_ | i64 | The timestamp of the next epoch Epoch is used to limit referrer rewards earned in single epoch |
maker_ | u64 | Rolling 30day maker volume for user precision: QUOTE_PRECISION |
taker_ | u64 | Rolling 30day taker volume for user precision: QUOTE_PRECISION |
filler_ | u64 | Rolling 30day filler volume for user precision: QUOTE_PRECISION |
last_ | i64 | last time the maker volume was updated |
last_ | i64 | last time the taker volume was updated |
last_ | i64 | last time the filler volume was updated |
if_ | u64 | The amount of tokens staked in the quote spot markets if |
number_ | u16 | The current number of sub accounts |
number_ | u16 | The number of sub accounts created. Can be greater than the number of sub accounts if user has deleted sub accounts |
referrer_ | u8 | Flags for referrer status: First bit (LSB): 1 if user is a referrer, 0 otherwise Second bit: 1 if user was referred, 0 otherwise |
disable_ | u8 | |
paused_ | u8 | |
fuel_ | u8 | whether the user has a FuelOverflow account |
fuel_ | u32 | accumulated fuel for token amounts of insurance |
fuel_ | u32 | accumulated fuel for notional of deposits |
fuel_ | u32 | accumulate fuel bonus for notional of borrows |
fuel_ | u32 | accumulated fuel for perp open interest |
fuel_taker | u32 | accumulate fuel bonus for taker volume |
fuel_maker | u32 | accumulate fuel bonus for maker volume |
if_ | u64 | The amount of tokens staked in the governance spot markets if |
last_ | u32 | last unix ts user stats data was used to update if fuel (u32 to save space) |
padding | [u8; 12] |
Events#
Variants of instructions::, decoded from the CpiEvent instruction. Each wraps a struct from carbon_. The discriminator is the 8-byte event discriminator that follows the e445a52e51cb9a1d CPI-event tag.
NewUserRecord#
Discriminator ecba71db2a3395f9 · events::.
| Field | Type |
|---|---|
ts | i64 |
user_ | Pubkey |
user | Pubkey |
sub_ | u16 |
name | [u8; 32] |
referrer | Pubkey |
DepositRecord#
Discriminator b4f1dacf66872c86 · events::.
| Field | Type |
|---|---|
ts | i64 |
user_ | Pubkey |
user | Pubkey |
direction | DepositDirection |
deposit_ | u64 |
amount | u64 |
market_ | u16 |
oracle_ | i64 |
market_ | u128 |
market_ | u128 |
market_ | u128 |
market_ | u128 |
total_ | u64 |
total_ | u64 |
explanation | DepositExplanation |
transfer_ | Option< |
signer | Option< |
user_ | i128 |
SpotInterestRecord#
Discriminator b7bacbbae1bb5f82 · events::.
| Field | Type |
|---|---|
ts | i64 |
market_ | u16 |
deposit_ | u128 |
cumulative_ | u128 |
borrow_ | u128 |
cumulative_ | u128 |
optimal_ | u32 |
optimal_ | u32 |
max_ | u32 |
FundingPaymentRecord#
Discriminator 083b601489c9385f · events::.
| Field | Type |
|---|---|
ts | i64 |
user_ | Pubkey |
user | Pubkey |
market_ | u16 |
funding_ | i64 |
base_ | i64 |
user_ | i64 |
amm_ | i128 |
amm_ | i128 |
FundingRateRecord#
Discriminator 4403ff1a855b93fe · events::.
| Field | Type |
|---|---|
ts | i64 |
record_id | u64 |
market_ | u16 |
funding_ | i64 |
funding_ | i128 |
funding_ | i128 |
cumulative_ | i128 |
cumulative_ | i128 |
oracle_ | i64 |
mark_ | u64 |
period_ | i64 |
base_ | i128 |
base_ | i128 |
CurveRecord#
Discriminator 65ee28e4462e3d75 · events::.
| Field | Type |
|---|---|
ts | i64 |
record_id | u64 |
peg_ | u128 |
base_ | u128 |
quote_ | u128 |
sqrt_ | u128 |
peg_ | u128 |
base_ | u128 |
quote_ | u128 |
sqrt_ | u128 |
base_ | u128 |
base_ | u128 |
base_ | i128 |
total_fee | i128 |
total_ | i128 |
adjustment_ | i128 |
oracle_ | i64 |
fill_record | u128 |
number_ | u32 |
market_ | u16 |
SignedMsgOrderRecord#
Discriminator d3c519128e56711b · events::.
| Field | Type |
|---|---|
user | Pubkey |
hash | String |
matching_ | OrderParams |
user_ | u32 |
signed_ | u64 |
signed_ | [u8; 8] |
ts | i64 |
OrderRecord#
Discriminator 681340385915025a · events::.
| Field | Type |
|---|---|
ts | i64 |
user | Pubkey |
order | Order |
OrderActionRecord#
Discriminator e0344347c2ed6d01 · events::.
| Field | Type |
|---|---|
ts | i64 |
action | OrderAction |
action_ | OrderActionExplanation |
market_ | u16 |
market_type | MarketType |
filler | Option< |
filler_ | Option<u64> |
fill_ | Option<u64> |
base_ | Option<u64> |
quote_ | Option<u64> |
taker_fee | Option<u64> |
maker_fee | Option<i64> |
referrer_ | Option<u32> |
quote_ | Option<i64> |
spot_ | Option<u64> |
taker | Option< |
taker_ | Option<u32> |
taker_ | Option< |
taker_ | Option<u64> |
taker_ | Option<u64> |
taker_ | Option<u64> |
maker | Option< |
maker_ | Option<u32> |
maker_ | Option< |
maker_ | Option<u64> |
maker_ | Option<u64> |
maker_ | Option<u64> |
oracle_ | i64 |
bit_flags | u8 |
taker_ | Option<u64> |
taker_ | Option<u64> |
maker_ | Option<u64> |
maker_ | Option<u64> |
trigger_ | Option<u64> |
builder_idx | Option<u8> |
builder_fee | Option<u64> |
LPRecord#
Discriminator 65163626b20d8e6f · events::.
| Field | Type |
|---|---|
ts | i64 |
user | Pubkey |
action | LPAction |
n_shares | u64 |
market_ | u16 |
delta_ | i64 |
delta_ | i64 |
pnl | i64 |
LiquidationRecord#
Discriminator 7f11006cb60de735 · events::.
| Field | Type |
|---|---|
ts | i64 |
liquidation_ | LiquidationType |
user | Pubkey |
liquidator | Pubkey |
margin_ | u128 |
total_ | i128 |
margin_ | u64 |
liquidation_ | u16 |
bankrupt | bool |
canceled_ | Vec<u32> |
liquidate_ | LiquidatePerpRecord |
liquidate_ | LiquidateSpotRecord |
liquidate_ | LiquidateBorrowForPerpPnlRecord |
liquidate_ | LiquidatePerpPnlForDepositRecord |
perp_ | PerpBankruptcyRecord |
spot_ | SpotBankruptcyRecord |
bit_flags | u8 |
SettlePnlRecord#
Discriminator 3944691a77c6d559 · events::.
| Field | Type |
|---|---|
ts | i64 |
user | Pubkey |
market_ | u16 |
pnl | i128 |
base_ | i64 |
quote_ | i64 |
quote_ | i64 |
settle_ | i64 |
explanation | SettlePnlExplanation |
InsuranceFundRecord#
Discriminator 38ded7eb4ec56392 · events::.
| Field | Type |
|---|---|
ts | i64 |
spot_ | u16 |
perp_ | u16 |
user_ | u32 |
total_ | u32 |
vault_ | u64 |
insurance_ | u64 |
total_ | u128 |
total_ | u128 |
amount | i64 |
InsuranceFundStakeRecord#
Discriminator 44429c07d894fa72 · events::.
| Field | Type |
|---|---|
ts | i64 |
user_ | Pubkey |
action | StakeAction |
amount | u64 |
market_ | u16 |
insurance_ | u64 |
if_ | u128 |
user_ | u128 |
total_ | u128 |
if_ | u128 |
user_ | u128 |
total_ | u128 |
InsuranceFundSwapRecord#
Discriminator 55be63cbed21e364 · events::.
| Field | Type |
|---|---|
rebalance_ | Pubkey |
in_ | u128 |
out_ | u128 |
in_ | u128 |
out_ | u128 |
in_ | u128 |
out_ | u128 |
in_ | u128 |
out_ | u128 |
ts | i64 |
in_amount | u64 |
out_amount | u64 |
out_ | u64 |
out_ | i64 |
in_ | u64 |
out_ | u64 |
in_ | u64 |
out_ | u64 |
in_ | u16 |
out_ | u16 |
TransferProtocolIfSharesToRevenuePoolRecord#
Discriminator d1768ea7822ea497 · events::.
| Field | Type |
|---|---|
ts | i64 |
market_ | u16 |
amount | u64 |
shares | u128 |
if_ | u64 |
protocol_ | u128 |
transfer_ | u64 |
SwapRecord#
Discriminator a2bb7bc28a38faf1 · events::.
| Field | Type |
|---|---|
ts | i64 |
user | Pubkey |
amount_out | u64 |
amount_in | u64 |
out_ | u16 |
in_ | u16 |
out_ | i64 |
in_ | i64 |
fee | u64 |
SpotMarketVaultDepositRecord#
Discriminator b2d917bc7fbe2049 · events::.
| Field | Type |
|---|---|
ts | i64 |
market_ | u16 |
deposit_ | u128 |
cumulative_ | u128 |
cumulative_ | u128 |
deposit_ | u64 |
amount | u64 |
DeleteUserRecord#
Discriminator 476fbe76070384de · events::.
| Field | Type |
|---|---|
ts | i64 |
user_ | Pubkey |
user | Pubkey |
sub_ | u16 |
keeper | Option< |
FuelSweepRecord#
Discriminator 295425f684f08308 · events::.
| Field | Type |
|---|---|
ts | i64 |
authority | Pubkey |
user_ | u32 |
user_ | u32 |
user_ | u32 |
user_ | u32 |
user_ | u32 |
user_ | u32 |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
FuelSeasonRecord#
Discriminator 13897721e0f90657 · events::.
| Field | Type |
|---|---|
ts | i64 |
authority | Pubkey |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
fuel_ | u128 |
fuel_taker | u128 |
fuel_maker | u128 |
fuel_total | u128 |
RevenueShareSettleRecord#
Discriminator 3da2590a18143b2d · events::.
| Field | Type |
|---|---|
ts | i64 |
builder | Option< |
referrer | Option< |
fee_settled | u64 |
market_ | u16 |
market_type | MarketType |
builder_ | u16 |
builder_ | u64 |
builder_ | u64 |
LPSettleRecord#
Discriminator d0bf836ead300702 · events::.
| Field | Type |
|---|---|
record_id | u64 |
last_ts | i64 |
last_slot | u64 |
ts | i64 |
slot | u64 |
perp_ | u16 |
settle_ | i64 |
perp_ | i64 |
perp_ | i64 |
lp_aum | u128 |
lp_price | u128 |
lp_pool | Pubkey |
LPSwapRecord#
Discriminator 9f3e82c4604fb0fe · events::.
| Field | Type |
|---|---|
ts | i64 |
slot | u64 |
authority | Pubkey |
out_amount | u128 |
in_amount | u128 |
out_fee | i128 |
in_fee | i128 |
out_ | u16 |
in_ | u16 |
out_ | u16 |
in_ | u16 |
out_ | i64 |
in_ | i64 |
last_aum | u128 |
last_ | u64 |
in_ | i64 |
out_ | i64 |
in_ | i64 |
out_ | i64 |
in_swap_id | u64 |
out_swap_id | u64 |
lp_pool | Pubkey |
LPMintRedeemRecord#
Discriminator 35b28e494e5b5b08 · events::.
| Field | Type |
|---|---|
ts | i64 |
slot | u64 |
authority | Pubkey |
description | u8 |
amount | u128 |
fee | i128 |
spot_ | u16 |
constituent_ | u16 |
oracle_ | i64 |
mint | Pubkey |
lp_amount | u64 |
lp_fee | i64 |
lp_price | u128 |
mint_ | u64 |
last_aum | u128 |
last_ | u64 |
in_ | i64 |
in_ | i64 |
lp_pool | Pubkey |
LPBorrowLendDepositRecord#
Discriminator f2b50b38f33d4fd2 · events::.
| Field | Type |
|---|---|
ts | i64 |
slot | u64 |
spot_ | u16 |
constituent_ | u16 |
direction | DepositDirection |
token_ | i64 |
last_ | i64 |
interest_ | i64 |
amount_ | u64 |
lp_pool | Pubkey |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AddAmmConstituentMappingDatum#
Struct types::.
| Field | Type |
|---|---|
constituent_ | u16 |
perp_ | u16 |
weight | i64 |
AMM#
Struct types::AMM.
| Field | Type | Description |
|---|---|---|
oracle | Pubkey | oracle price data public key |
historical_ | HistoricalOracleData | stores historically witnessed oracle data |
base_ | i128 | accumulated base asset amount since inception per lp share precision: QUOTE_PRECISION |
quote_ | i128 | accumulated quote asset amount since inception per lp share precision: QUOTE_PRECISION |
fee_pool | PoolBalance | partition of fees from perp market trading moved from pnl settlements |
base_ | u128 | x reserves for constant product mm formula (x * y = k) precision: AMM_RESERVE_PRECISION |
quote_ | u128 | y reserves for constant product mm formula (x * y = k) precision: AMM_RESERVE_PRECISION |
concentration_ | u128 | determines how close the min/max base asset reserve sit vs base reserves allow for decreasing slippage without increasing liquidity and v.v. precision: PERCENTAGE_PRECISION |
min_ | u128 | minimum base_asset_reserve allowed before AMM is unavailable precision: AMM_RESERVE_PRECISION |
max_ | u128 | maximum base_asset_reserve allowed before AMM is unavailable precision: AMM_RESERVE_PRECISION |
sqrt_k | u128 | sqrt(k) in constant product mm formula (x * y = k). stored to avoid drift caused by integer math issues precision: AMM_RESERVE_PRECISION |
peg_ | u128 | normalizing numerical factor for y, its use offers lowest slippage in cp-curve when market is balanced precision: PEG_PRECISION |
terminal_ | u128 | y when market is balanced. stored to save computation precision: AMM_RESERVE_PRECISION |
base_ | i128 | always non-negative. tracks number of total longs in market (regardless of counterparty) precision: BASE_PRECISION |
base_ | i128 | always non-positive. tracks number of total shorts in market (regardless of counterparty) precision: BASE_PRECISION |
base_ | i128 | tracks net position (longs-shorts) in market with AMM as counterparty precision: BASE_PRECISION |
base_ | i128 | tracks net position (longs-shorts) in market with LPs as counterparty precision: BASE_PRECISION |
max_ | u128 | max allowed open interest, blocks trades that breach this value precision: BASE_PRECISION |
quote_ | i128 | sum of all user's perp quote_asset_amount in market precision: QUOTE_PRECISION |
quote_ | i128 | sum of all long user's quote_entry_amount in market precision: QUOTE_PRECISION |
quote_ | i128 | sum of all short user's quote_entry_amount in market precision: QUOTE_PRECISION |
quote_ | i128 | sum of all long user's quote_break_even_amount in market precision: QUOTE_PRECISION |
quote_ | i128 | sum of all short user's quote_break_even_amount in market precision: QUOTE_PRECISION |
user_ | u128 | total user lp shares of sqrt_k (protocol owned liquidity = sqrt_k - last_funding_rate) precision: AMM_RESERVE_PRECISION |
last_ | i64 | last funding rate in this perp market (unit is quote per base) precision: FUNDING_RATE_PRECISION |
last_ | i64 | last funding rate for longs in this perp market (unit is quote per base) precision: FUNDING_RATE_PRECISION |
last_ | i64 | last funding rate for shorts in this perp market (unit is quote per base) precision: QUOTE_PRECISION |
last24h_ | i64 | estimate of last 24h of funding rate perp market (unit is quote per base) precision: QUOTE_PRECISION |
total_fee | i128 | total fees collected by this perp market precision: QUOTE_PRECISION |
total_ | i128 | total fees collected by the vAMM's bid/ask spread precision: QUOTE_PRECISION |
total_ | u128 | total fees collected by exchange fee schedule precision: QUOTE_PRECISION |
total_ | i128 | total fees minus any recognized upnl and pool withdraws precision: QUOTE_PRECISION |
total_ | u128 | sum of all fees from fee pool withdrawn to revenue pool precision: QUOTE_PRECISION |
total_ | u128 | all fees collected by market for liquidations precision: QUOTE_PRECISION |
cumulative_ | i128 | accumulated funding rate for longs since inception in market |
cumulative_ | i128 | accumulated funding rate for shorts since inception in market |
total_ | u128 | accumulated social loss paid by users since inception in market |
ask_ | u128 | transformed base_asset_reserve for users going long precision: AMM_RESERVE_PRECISION |
ask_ | u128 | transformed quote_asset_reserve for users going long precision: AMM_RESERVE_PRECISION |
bid_ | u128 | transformed base_asset_reserve for users going short precision: AMM_RESERVE_PRECISION |
bid_ | u128 | transformed quote_asset_reserve for users going short precision: AMM_RESERVE_PRECISION |
last_ | i64 | the last seen oracle price partially shrunk toward the amm reserve price precision: PRICE_PRECISION |
last_ | i64 | the gap between the oracle price and the reserve price = y * peg_multiplier / x |
last_ | u64 | average estimate of bid price over funding_period precision: PRICE_PRECISION |
last_ | u64 | average estimate of ask price over funding_period precision: PRICE_PRECISION |
last_ | u64 | average estimate of (bid+ask)/2 price over funding_period precision: PRICE_PRECISION |
last_ | u64 | average estimate of (bid+ask)/2 price over FIVE_MINUTES |
last_ | u64 | the last blockchain slot the amm was updated |
last_ | u64 | the pct size of the oracle confidence interval precision: PERCENTAGE_PRECISION |
net_ | i64 | the total_fee_minus_distribution change since the last funding update precision: QUOTE_PRECISION |
last_ | i64 | the last funding rate update unix_timestamp |
funding_ | i64 | the peridocity of the funding rate updates |
order_ | u64 | the base step size (increment) of orders precision: BASE_PRECISION |
order_ | u64 | the price tick size of orders precision: PRICE_PRECISION |
min_ | u64 | the minimum base size of an order precision: BASE_PRECISION |
mm_ | u64 | the max base size a single user can have precision: BASE_PRECISION |
volume24h | u64 | estimated total of volume in market QUOTE_PRECISION |
long_ | u64 | the volume intensity of long fills against AMM |
short_ | u64 | the volume intensity of short fills against AMM |
last_ | i64 | the blockchain unix timestamp at the time of the last trade |
mark_std | u64 | estimate of standard deviation of the fill (mark) prices precision: PRICE_PRECISION |
oracle_std | u64 | estimate of standard deviation of the oracle price at each update precision: PRICE_PRECISION |
last_ | i64 | the last unix_timestamp the mark twap was updated |
base_spread | u32 | the minimum spread the AMM can quote. also used as step size for some spread logic increases. |
max_spread | u32 | the maximum spread the AMM can quote |
long_spread | u32 | the spread for asks vs the reserve price |
short_ | u32 | the spread for bids vs the reserve price |
mm_ | i64 | MM oracle price |
max_ | u16 | the fraction of total available liquidity a single fill on the AMM can consume |
max_ | u16 | the maximum slippage a single fill on the AMM can push |
curve_ | u8 | the update intensity of AMM formulaic updates (adjusting k). 0-100 |
amm_ | u8 | the jit intensity of AMM. larger intensity means larger participation in jit. 0 means no jit participation. (0, 100] is intensity for protocol-owned AMM. (100, 200] is intensity for user LP-owned AMM. |
oracle_ | OracleSource | the oracle provider information. used to decode/scale the oracle public key |
last_ | bool | tracks whether the oracle was considered valid at the last AMM update |
target_ | i32 | the target value for base_, used during AMM JIT with LP split precision: BASE_PRECISION |
per_lp_base | i8 | expo for unit of per_lp, base 10 (if per_lp_base=X, then per_lp unit is 10^X) |
oracle_ | i8 | the override for the state.min_perp_auction_duration 0 is no override, -1 is disable speed bump, 1-100 is literal speed bump |
amm_ | i8 | signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double) |
oracle_ | i8 | |
mm_ | u64 | |
net_ | i64 | |
quote_ | i64 | |
reference_ | i32 | |
amm_ | i8 | signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double) |
reference_ | u8 | |
padding | [u8; 2] | |
last_ | i64 |
AmmCacheFixed#
Struct types::.
| Field | Type |
|---|---|
bump | u8 |
pad | [u8; 3] |
len | u32 |
AmmConstituentDatum#
Struct types::.
| Field | Type | Description |
|---|---|---|
perp_ | u16 | |
constituent_ | u16 | |
padding | [u8; 4] | |
last_slot | u64 | |
weight | i64 | PERCENTAGE_PRECISION. The weight this constituent has on the perp market |
AmmConstituentMappingFixed#
Struct types::.
| Field | Type |
|---|---|
lp_pool | Pubkey |
bump | u8 |
pad | [u8; 3] |
len | u32 |
AssetTier#
Enum types::.
| Variant |
|---|
Collateral |
Protected |
Cross |
Isolated |
Unlisted |
AssetType#
Enum types::.
| Variant |
|---|
Base |
Quote |
BuilderInfo#
Struct types::.
| Field | Type |
|---|---|
authority | Pubkey |
max_ | u16 |
padding | [u8; 6] |
CacheInfo#
Struct types::.
| Field | Type | Description |
|---|---|---|
oracle | Pubkey | |
last_ | u128 | |
last_ | i128 | |
last_ | u128 | |
last_ | u128 | |
last_ | i128 | |
position | i64 | BASE PRECISION |
slot | u64 | |
last_ | u64 | |
last_ | u64 | |
last_ | i64 | |
quote_ | i64 | |
amm_ | i64 | |
oracle_ | i64 | |
oracle_slot | u64 | |
market_ | u16 | |
oracle_ | u8 | |
oracle_ | u8 | |
lp_ | u8 | |
amm_ | u8 | |
padding | [u8; 34] |
ConstituentCorrelationsFixed#
Struct types::.
| Field | Type | Description |
|---|---|---|
lp_pool | Pubkey | |
bump | u8 | |
pad | [u8; 3] | |
len | u32 | total elements in the flattened data vec |
ConstituentLpOperation#
Enum types::.
| Variant |
|---|
Swap |
Deposit |
Withdraw |
ConstituentParams#
Struct types::.
| Field | Type |
|---|---|
max_ | Option<i64> |
swap_ | Option<i64> |
swap_ | Option<i64> |
max_ | Option<u64> |
oracle_ | Option<u64> |
cost_ | Option<i32> |
constituent_ | Option<i16> |
derivative_ | Option<u64> |
volatility | Option<u64> |
gamma_ | Option<u8> |
gamma_ | Option<u8> |
xi | Option<u8> |
ConstituentSpotBalance#
Struct types::.
| Field | Type | Description |
|---|---|---|
scaled_ | u128 | The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow interest of corresponding market. precision: token precision |
cumulative_ | i64 | The cumulative deposits/borrows a user has made into a market precision: token mint precision |
market_ | u16 | The market index of the corresponding spot market |
balance_ | SpotBalanceType | Whether the position is deposit or borrow |
padding | [u8; 5] |
ConstituentStatus#
Enum types::.
| Variant |
|---|
ReduceOnly |
Decommissioned |
ConstituentTargetBaseFixed#
Struct types::.
| Field | Type | Description |
|---|---|---|
lp_pool | Pubkey | |
bump | u8 | |
pad | [u8; 3] | |
len | u32 | total elements in the flattened data vec |
ContractTier#
Enum types::.
| Variant |
|---|
A |
B |
C |
Speculative |
HighlySpeculative |
Isolated |
ContractType#
Enum types::.
| Variant |
|---|
Perpetual |
Future |
Prediction |
CurveRecord#
Struct types::. Same fields as the CurveRecord event.
DeleteUserRecord#
Struct types::. Same fields as the DeleteUserRecord event.
DepositDirection#
Enum types::.
| Variant |
|---|
Deposit |
Withdraw |
DepositExplanation#
Enum types::.
| Variant |
|---|
None |
Transfer |
Borrow |
RepayBorrow |
Reward |
DepositRecord#
Struct types::. Same fields as the DepositRecord event.
DriftAction#
Enum types::.
| Variant |
|---|
UpdateFunding |
SettlePnl |
TriggerOrder |
FillOrderMatch |
FillOrderAmmLowRisk |
FillOrderAmmImmediate |
Liquidate |
MarginCalc |
UpdateTwap |
UpdateAMMCurve |
OracleOrderPrice |
UseMMOraclePrice |
UpdateAmmCache |
UpdateLpPoolAum |
LpPoolSwap |
ExchangeStatus#
Enum types::.
| Variant |
|---|
DepositPaused |
WithdrawPaused |
AmmPaused |
FillPaused |
LiqPaused |
FundingPaused |
SettlePnlPaused |
AmmImmediateFillPaused |
FeatureBitFlags#
Enum types::.
| Variant |
|---|
MmOracleUpdate |
MedianTriggerPrice |
BuilderCodes |
BuilderReferral |
FeeStructure#
Struct types::.
| Field | Type |
|---|---|
fee_tiers | [FeeTier; 10] |
filler_ | OrderFillerRewardStructure |
referrer_ | u64 |
flat_ | u64 |
FeeTier#
Struct types::.
| Field | Type |
|---|---|
fee_ | u32 |
fee_ | u32 |
maker_ | u32 |
maker_ | u32 |
referrer_ | u32 |
referrer_ | u32 |
referee_ | u32 |
referee_ | u32 |
FillMode#
Enum types::.
| Variant | Fields |
|---|---|
Fill | |
PlaceAndMake | |
PlaceAndTake | bool, u8 |
Liquidation |
FuelOverflowStatus#
Enum types::.
| Variant |
|---|
Exists |
FuelSeasonRecord#
Struct types::. Same fields as the FuelSeasonRecord event.
FuelSweepRecord#
Struct types::. Same fields as the FuelSweepRecord event.
FundingPaymentRecord#
Struct types::. Same fields as the FundingPaymentRecord event.
FundingRateRecord#
Struct types::. Same fields as the FundingRateRecord event.
HistoricalIndexData#
Struct types::.
| Field | Type | Description |
|---|---|---|
last_ | u64 | precision: PRICE_PRECISION |
last_ | u64 | precision: PRICE_PRECISION |
last_ | u64 | precision: PRICE_PRECISION |
last_ | u64 | precision: PRICE_PRECISION |
last_ | i64 | unix_timestamp of last snapshot |
HistoricalOracleData#
Struct types::.
| Field | Type | Description |
|---|---|---|
last_ | i64 | precision: PRICE_PRECISION |
last_ | u64 | precision: PRICE_PRECISION |
last_ | i64 | number of slots since last update |
last_ | i64 | precision: PRICE_PRECISION |
last_ | i64 | precision: PRICE_PRECISION |
last_ | i64 | unix_timestamp of last snapshot |
IfRebalanceConfigParams#
Struct types::.
| Field | Type |
|---|---|
total_ | u64 |
epoch_ | u64 |
epoch_ | i64 |
out_ | u16 |
in_ | u16 |
max_ | u16 |
swap_mode | u8 |
status | u8 |
InsuranceClaim#
Struct types::.
| Field | Type | Description |
|---|---|---|
revenue_ | i64 | The amount of revenue last settled Positive if funds left the perp market, negative if funds were pulled into the perp market precision: QUOTE_PRECISION |
max_ | u64 | The max amount of revenue that can be withdrawn per period precision: QUOTE_PRECISION |
quote_ | u64 | The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits precision: QUOTE_PRECISION |
quote_ | u64 | The amount of insurance that has been used to resolve bankruptcy and pnl deficits precision: QUOTE_PRECISION |
last_ | i64 | The last time revenue was settled in/out of market |
InsuranceFund#
Struct types::.
| Field | Type |
|---|---|
vault | Pubkey |
total_ | u128 |
user_shares | u128 |
shares_base | u128 |
unstaking_ | i64 |
last_ | i64 |
revenue_ | i64 |
total_ | u32 |
user_factor | u32 |
InsuranceFundOperation#
Enum types::.
| Variant |
|---|
Init |
Add |
RequestRemove |
Remove |
InsuranceFundRecord#
Struct types::. Same fields as the InsuranceFundRecord event.
InsuranceFundStakeRecord#
Struct types::. Same fields as the InsuranceFundStakeRecord event.
InsuranceFundSwapRecord#
Struct types::. Same fields as the InsuranceFundSwapRecord event.
LiquidateBorrowForPerpPnlRecord#
Struct types::.
| Field | Type |
|---|---|
perp_ | u16 |
market_ | i64 |
pnl_ | u128 |
liability_ | u16 |
liability_ | i64 |
liability_ | u128 |
LiquidatePerpPnlForDepositRecord#
Struct types::.
| Field | Type |
|---|---|
perp_ | u16 |
market_ | i64 |
pnl_ | u128 |
asset_ | u16 |
asset_price | i64 |
asset_ | u128 |
LiquidatePerpRecord#
Struct types::.
| Field | Type | Description |
|---|---|---|
market_ | u16 | |
oracle_ | i64 | |
base_ | i64 | |
quote_ | i64 | |
lp_shares | u64 | precision: AMM_RESERVE_PRECISION |
fill_ | u64 | |
user_ | u32 | |
liquidator_ | u32 | |
liquidator_ | u64 | precision: QUOTE_PRECISION |
if_fee | u64 | precision: QUOTE_PRECISION |
LiquidateSpotRecord#
Struct types::.
| Field | Type | Description |
|---|---|---|
asset_ | u16 | |
asset_price | i64 | |
asset_ | u128 | |
liability_ | u16 | |
liability_ | i64 | |
liability_ | u128 | precision: token mint precision |
if_fee | u64 | precision: token mint precision |
LiquidationBitFlag#
Enum types::.
| Variant |
|---|
IsolatedPosition |
LiquidationMultiplierType#
Enum types::.
| Variant |
|---|
Discount |
Premium |
LiquidationRecord#
Struct types::. Same fields as the LiquidationRecord event.
LiquidationType#
Enum types::.
| Variant |
|---|
LiquidatePerp |
LiquidateSpot |
LiquidateBorrowForPerpPnl |
LiquidatePerpPnlForDeposit |
PerpBankruptcy |
SpotBankruptcy |
LogMode#
Enum types::.
| Variant |
|---|
None |
ExchangeOracle |
MMOracle |
SafeMMOracle |
Margin |
LPAction#
Enum types::.
| Variant |
|---|
AddLiquidity |
RemoveLiquidity |
SettleLiquidity |
RemoveLiquidityDerisk |
LPBorrowLendDepositRecord#
Struct types::. Same fields as the LPBorrowLendDepositRecord event.
LPMintRedeemRecord#
Struct types::. Same fields as the LPMintRedeemRecord event.
LpPoolFeatureBitFlags#
Enum types::.
| Variant |
|---|
SettleLpPool |
SwapLpPool |
MintRedeemLpPool |
LpPoolParams#
Struct types::.
| Field | Type |
|---|---|
max_ | Option<u64> |
volatility | Option<u64> |
gamma_ | Option<u8> |
xi | Option<u8> |
max_aum | Option< |
whitelist_ | Option< |
LPRecord#
Struct types::. Same fields as the LPRecord event.
LPSettleRecord#
Struct types::. Same fields as the LPSettleRecord event.
LpStatus#
Enum types::.
| Variant |
|---|
Uncollateralized |
Active |
Decommissioning |
LPSwapRecord#
Struct types::. Same fields as the LPSwapRecord event.
MarginCalculationMode#
Enum types::.
| Variant | Fields |
|---|---|
Standard | |
Liquidation | market_: Option< |
MarginMode#
Enum types::.
| Variant |
|---|
Default |
HighLeverage |
HighLeverageMaintenance |
MarginRequirementType#
Enum types::.
| Variant |
|---|
Initial |
Fill |
Maintenance |
MarginTypeConfig#
Enum types::.
| Variant | Fields |
|---|---|
Default | MarginRequirementType |
IsolatedPositionOverride | market_: u16, margin_: MarginRequirementType, default_: MarginRequirementType, cross_: MarginRequirementType |
CrossMarginOverride | margin_: MarginRequirementType, default_: MarginRequirementType |
MarketConfigFlag#
Enum types::.
| Variant |
|---|
DisableFormulaicKUpdate |
MarketIdentifier#
Struct types::.
| Field | Type |
|---|---|
market_type | MarketType |
market_ | u16 |
MarketStatus#
Enum types::.
| Variant |
|---|
Initialized |
Active |
FundingPaused |
AmmPaused |
FillPaused |
WithdrawPaused |
ReduceOnly |
Settlement |
Delisted |
MarketType#
Enum types::.
| Variant |
|---|
Spot |
Perp |
ModifyOrderId#
Enum types::.
| Variant | Fields |
|---|---|
UserOrderId | u8 |
OrderId | u32 |
ModifyOrderParams#
Struct types::.
| Field | Type |
|---|---|
direction | Option< |
base_ | Option<u64> |
price | Option<u64> |
reduce_only | Option< |
post_only | Option< |
bit_flags | Option<u8> |
max_ts | Option<i64> |
trigger_ | Option<u64> |
trigger_ | Option< |
oracle_ | Option<i32> |
auction_ | Option<u8> |
auction_ | Option<i64> |
auction_ | Option<i64> |
policy | Option<u8> |
ModifyOrderPolicy#
Enum types::.
| Variant |
|---|
MustModify |
ExcludePreviousFill |
NewUserRecord#
Struct types::. Same fields as the NewUserRecord event.
OracleGuardRails#
Struct types::.
| Field | Type |
|---|---|
price_ | PriceDivergenceGuardRails |
validity | ValidityGuardRails |
OracleSource#
Enum types::.
| Variant |
|---|
Pyth |
Switchboard |
QuoteAsset |
Pyth1K |
Pyth1M |
PythStableCoin |
Prelaunch |
PythPull |
Pyth1KPull |
Pyth1MPull |
PythStableCoinPull |
SwitchboardOnDemand |
PythLazer |
PythLazer1K |
PythLazer1M |
PythLazerStableCoin |
OracleValidity#
Enum types::.
| Variant | Fields |
|---|---|
NonPositive | |
TooVolatile | |
TooUncertain | |
StaleForMargin | |
InsufficientDataPoints | |
StaleForAMM | immediate: bool, low_risk: bool |
Valid |
Order#
Struct types::.
| Field | Type | Description |
|---|---|---|
slot | u64 | The slot the order was placed |
price | u64 | The limit price for the order (can be 0 for market orders) For orders with an auction, this price isn't used until the auction is complete precision: PRICE_PRECISION |
base_ | u64 | The size of the order precision for perps: BASE_PRECISION precision for spot: token mint precision |
base_ | u64 | The amount of the order filled precision for perps: BASE_PRECISION precision for spot: token mint precision |
quote_ | u64 | The amount of quote filled for the order precision: QUOTE_PRECISION |
trigger_ | u64 | At what price the order will be triggered. Only relevant for trigger orders precision: PRICE_PRECISION |
auction_ | i64 | The start price for the auction. Only relevant for market/oracle orders precision: PRICE_PRECISION |
auction_ | i64 | The end price for the auction. Only relevant for market/oracle orders precision: PRICE_PRECISION |
max_ts | i64 | The time when the order will expire |
oracle_ | i32 | If set, the order limit price is the oracle price + this offset precision: PRICE_PRECISION |
order_id | u32 | The id for the order. Each users has their own order id space |
market_ | u16 | The perp/spot market index |
status | OrderStatus | Whether the order is open or unused |
order_type | OrderType | The type of order |
market_type | MarketType | Whether market is spot or perp |
user_ | u8 | User generated order id. Can make it easier to place/cancel orders |
existing_ | PositionDirection | What the users position was when the order was placed |
direction | PositionDirection | Whether the user is going long or short. LONG = bid, SHORT = ask |
reduce_only | bool | Whether the order is allowed to only reduce position size |
post_only | bool | Whether the order must be a maker |
immediate_ | bool | Whether the order must be canceled the same slot it is placed |
trigger_ | OrderTriggerCondition | Whether the order is triggered above or below the trigger price. Only relevant for trigger orders |
auction_ | u8 | How many slots the auction lasts |
posted_ | u8 | Last 8 bits of the slot the order was posted on-chain (not order slot for signed msg orders) |
bit_flags | u8 | Bitflags for further classification 0: is_signed_message |
padding | [u8; 1] |
OrderAction#
Enum types::.
| Variant |
|---|
Place |
Cancel |
Fill |
Trigger |
Expire |
OrderActionExplanation#
Enum types::.
| Variant |
|---|
None |
InsufficientFreeCollateral |
OraclePriceBreachedLimitPrice |
MarketOrderFilledToLimitPrice |
OrderExpired |
Liquidation |
OrderFilledWithAMM |
OrderFilledWithAMMJit |
OrderFilledWithMatch |
OrderFilledWithMatchJit |
MarketExpired |
RiskingIncreasingOrder |
ReduceOnlyOrderIncreasedPosition |
OrderFillWithSerum |
NoBorrowLiquidity |
OrderFillWithPhoenix |
OrderFilledWithAMMJitLPSplit |
OrderFilledWithLPJit |
DeriskLp |
OrderFilledWithOpenbookV2 |
TransferPerpPosition |
OrderActionRecord#
Struct types::. Same fields as the OrderActionRecord event.
OrderBitFlag#
Enum types::.
| Variant |
|---|
SignedMessage |
OracleTriggerMarket |
SafeTriggerOrder |
NewTriggerReduceOnly |
HasBuilder |
IsIsolatedPosition |
OrderFillerRewardStructure#
Struct types::.
| Field | Type |
|---|---|
reward_ | u32 |
reward_ | u32 |
time_ | u128 |
OrderParams#
Struct types::.
| Field | Type |
|---|---|
order_type | OrderType |
market_type | MarketType |
direction | PositionDirection |
user_ | u8 |
base_ | u64 |
price | u64 |
market_ | u16 |
reduce_only | bool |
post_only | PostOnlyParam |
bit_flags | u8 |
max_ts | Option<i64> |
trigger_ | Option<u64> |
trigger_ | OrderTriggerCondition |
oracle_ | Option<i32> |
auction_ | Option<u8> |
auction_ | Option<i64> |
auction_ | Option<i64> |
OrderParamsBitFlag#
Enum types::.
| Variant |
|---|
ImmediateOrCancel |
UpdateHighLeverageMode |
OrderRecord#
Struct types::. Same fields as the OrderRecord event.
OrderStatus#
Enum types::.
| Variant |
|---|
Init |
Open |
Filled |
Canceled |
OrderTriggerCondition#
Enum types::.
| Variant |
|---|
Above |
Below |
TriggeredAbove |
TriggeredBelow |
OrderType#
Enum types::.
| Variant |
|---|
Market |
Limit |
TriggerMarket |
TriggerLimit |
Oracle |
OverrideAmmCacheParams#
Struct types::.
| Field | Type |
|---|---|
quote_ | Option<i64> |
last_ | Option<u64> |
last_ | Option< |
last_ | Option< |
amm_ | Option<u8> |
amm_ | Option<i64> |
PerpBankruptcyRecord#
Struct types::.
| Field | Type |
|---|---|
market_ | u16 |
pnl | i128 |
if_payment | u128 |
clawback_ | Option< |
clawback_ | Option< |
cumulative_ | i128 |
PerpFulfillmentMethod#
Enum types::.
| Variant | Fields |
|---|---|
AMM | Option<u64> |
Match | Pubkey, u16, u64 |
PerpLpOperation#
Enum types::.
| Variant |
|---|
TrackAmmRevenue |
SettleQuoteOwed |
PerpOperation#
Enum types::.
| Variant |
|---|
UpdateFunding |
AmmFill |
Fill |
SettlePnl |
SettlePnlWithPosition |
Liquidation |
AmmImmediateFill |
SettleRevPool |
PerpPosition#
Struct types::.
| Field | Type | Description |
|---|---|---|
last_ | i64 | The perp market's last cumulative funding rate. Used to calculate the funding payment owed to user precision: FUNDING_RATE_PRECISION |
base_ | i64 | the size of the users perp position precision: BASE_PRECISION |
quote_ | i64 | Used to calculate the users pnl. Upon entry, is equal to base_asset_amount * avg entry price - fees Updated when the user open/closes position or settles pnl. Includes fees/funding precision: QUOTE_PRECISION |
quote_ | i64 | The amount of quote the user would need to exit their position at to break even Updated when the user open/closes position or settles pnl. Includes fees/funding precision: QUOTE_PRECISION |
quote_ | i64 | The amount quote the user entered the position with. Equal to base asset amount * avg entry price Updated when the user open/closes position. Excludes fees/funding precision: QUOTE_PRECISION |
open_bids | i64 | The amount of non reduce only trigger orders the user has open precision: BASE_PRECISION |
open_asks | i64 | The amount of non reduce only trigger orders the user has open precision: BASE_PRECISION |
settled_pnl | i64 | The amount of pnl settled in this market since opening the position precision: QUOTE_PRECISION |
lp_shares | u64 | The number of lp (liquidity provider) shares the user has in this perp market LP shares allow users to provide liquidity via the AMM precision: BASE_PRECISION |
isolated_ | u64 | The scaled balance of the isolated position precision: SPOT_BALANCE_PRECISION |
last_ | i64 | The last quote asset amount per lp the amm had Used to settle the users lp position precision: QUOTE_PRECISION |
padding | [u8; 2] | |
max_ | u16 | |
market_ | u16 | The market index for the perp market |
open_orders | u8 | The number of open orders |
position_ | u8 |
PlaceAndTakeOrderSuccessCondition#
Enum types::.
| Variant |
|---|
PartialFill |
FullFill |
PoolBalance#
Struct types::.
| Field | Type | Description |
|---|---|---|
scaled_ | u128 | To get the pool's token amount, you must multiply the scaled balance by the market's cumulative deposit interest precision: SPOT_BALANCE_PRECISION |
market_ | u16 | The spot market the pool is for |
padding | [u8; 6] |
PositionDirection#
Enum types::.
| Variant |
|---|
Long |
Short |
PositionFlag#
Enum types::.
| Variant |
|---|
IsolatedPosition |
BeingLiquidated |
Bankrupt |
PositionUpdateType#
Enum types::.
| Variant |
|---|
Open |
Increase |
Reduce |
Close |
Flip |
PostOnlyParam#
Enum types::.
| Variant |
|---|
None |
MustPostOnly |
TryPostOnly |
Slide |
PrelaunchOracleParams#
Struct types::.
| Field | Type |
|---|---|
perp_ | u16 |
price | Option<i64> |
max_price | Option<i64> |
PriceDivergenceGuardRails#
Struct types::.
| Field | Type |
|---|---|
mark_ | u64 |
oracle_ | u64 |
ReferrerStatus#
Enum types::.
| Variant |
|---|
IsReferrer |
IsReferred |
BuilderReferral |
RevenueShareEscrowFixed#
Struct types::.
| Field | Type |
|---|---|
authority | Pubkey |
referrer | Pubkey |
referrer_ | u32 |
referrer_ | i8 |
referee_ | i8 |
referrer_ | i8 |
reserved_ | [u8; 17] |
RevenueShareOrder#
Struct types::.
| Field | Type | Description |
|---|---|---|
fees_ | u64 | fees accrued so far for this order slot. This is not exclusively fees from this order_id and may include fees from other orders in the same market. This may be swept to the builder's SpotPosition during settle_pnl. |
order_id | u32 | the order_id of the current active order in this slot. It's only relevant while bit_flag = Open |
fee_ | u16 | the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01% |
market_ | u16 | |
sub_ | u16 | the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open |
builder_idx | u8 | the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored if bit_flag = Referral. |
bit_flags | u8 | bitflags that describe the state of the order. [RevenueShareOrderBitFlag::]: this order slot is available for use. [RevenueShareOrderBitFlag::]: this order slot is occupied, order_id is the sub_'s active order. [RevenueShareOrderBitFlag::]: this order has been filled or canceled, and is waiting to be settled into. the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders. [RevenueShareOrderBitFlag::]: this order stores referral rewards waiting to be settled for this market. If it is set, no other bitflag should be set. |
user_ | u8 | the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches. |
market_type | MarketType | |
padding | [u8; 10] |
RevenueShareOrderBitFlag#
Enum types::.
| Variant |
|---|
Init |
Open |
Completed |
Referral |
RevenueShareSettleRecord#
Struct types::. Same fields as the RevenueShareSettleRecord event.
ScaleOrderParams#
From the program's IDL:
Parameters for placing scale orders - multiple limit orders distributed across a price range
Struct types::.
| Field | Type | Description |
|---|---|---|
market_type | MarketType | |
direction | PositionDirection | |
market_ | u16 | |
total_ | u64 | Total base asset amount to distribute across all orders |
start_price | u64 | Starting price for the scale (in PRICE_PRECISION) |
end_price | u64 | Ending price for the scale (in PRICE_PRECISION) |
order_count | u8 | Number of orders to place (min 2, max 32) |
size_ | SizeDistribution | How to distribute sizes across orders |
reduce_only | bool | Whether orders should be reduce-only |
post_only | PostOnlyParam | Post-only setting for all orders |
bit_flags | u8 | Bit flags (e.g., for high leverage mode) |
max_ts | Option<i64> | Maximum timestamp for orders to be valid |
SettlementDirection#
Enum types::.
| Variant |
|---|
ToLpPool |
FromLpPool |
None |
SettlePnlExplanation#
Enum types::.
| Variant |
|---|
None |
ExpiredPosition |
SettlePnlMode#
Enum types::.
| Variant |
|---|
MustSettle |
TrySettle |
SettlePnlRecord#
Struct types::. Same fields as the SettlePnlRecord event.
SignatureVerificationError#
Enum types::.
| Variant |
|---|
InvalidEd25519InstructionProgramId |
InvalidEd25519InstructionDataLength |
InvalidSignatureIndex |
InvalidSignatureOffset |
InvalidPublicKeyOffset |
InvalidMessageOffset |
InvalidMessageDataSize |
InvalidInstructionIndex |
MessageOffsetOverflow |
InvalidMessageHex |
InvalidMessageData |
LoadInstructionAtFailed |
SignedMsgOrderId#
Struct types::.
| Field | Type |
|---|---|
uuid | [u8; 8] |
max_slot | u64 |
order_id | u32 |
padding | u32 |
SignedMsgOrderParamsDelegateMessage#
Struct types::.
| Field | Type |
|---|---|
signed_ | OrderParams |
taker_ | Pubkey |
slot | u64 |
uuid | [u8; 8] |
take_ | Option< |
stop_ | Option< |
max_ | Option<u16> |
builder_idx | Option<u8> |
builder_ | Option<u16> |
isolated_ | Option<u64> |
SignedMsgOrderParamsMessage#
Struct types::.
| Field | Type |
|---|---|
signed_ | OrderParams |
sub_ | u16 |
slot | u64 |
uuid | [u8; 8] |
take_ | Option< |
stop_ | Option< |
max_ | Option<u16> |
builder_idx | Option<u8> |
builder_ | Option<u16> |
isolated_ | Option<u64> |
SignedMsgOrderRecord#
Struct types::. Same fields as the SignedMsgOrderRecord event.
SignedMsgTriggerOrderParams#
Struct types::.
| Field | Type |
|---|---|
trigger_ | u64 |
base_ | u64 |
SignedMsgUserOrdersFixed#
Struct types::.
| Field | Type |
|---|---|
user_pubkey | Pubkey |
padding | u32 |
len | u32 |
SizeDistribution#
From the program's IDL:
How to distribute order sizes across scale orders
Enum types::.
| Variant |
|---|
Flat |
Ascending |
Descending |
SpotBalanceType#
Enum types::.
| Variant |
|---|
Deposit |
Borrow |
SpotBankruptcyRecord#
Struct types::.
| Field | Type |
|---|---|
market_ | u16 |
borrow_ | u128 |
if_payment | u128 |
cumulative_ | u128 |
SpotFulfillmentConfigStatus#
Enum types::.
| Variant |
|---|
Enabled |
Disabled |
SpotFulfillmentMethod#
Enum types::.
| Variant | Fields |
|---|---|
ExternalMarket | |
Match | Pubkey, u16 |
SpotFulfillmentType#
Enum types::.
| Variant |
|---|
SerumV3 |
Match |
PhoenixV1 |
OpenbookV2 |
SpotInterestRecord#
Struct types::. Same fields as the SpotInterestRecord event.
SpotMarketVaultDepositRecord#
Struct types::. Same fields as the SpotMarketVaultDepositRecord event.
SpotOperation#
Enum types::.
| Variant |
|---|
UpdateCumulativeInterest |
Fill |
Deposit |
Withdraw |
Liquidation |
SpotPosition#
Struct types::.
| Field | Type | Description |
|---|---|---|
scaled_ | u64 | The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow interest of corresponding market. precision: SPOT_BALANCE_PRECISION |
open_bids | i64 | How many spot non reduce only trigger orders the user has open precision: token mint precision |
open_asks | i64 | How many spot non reduce only trigger orders the user has open precision: token mint precision |
cumulative_ | i64 | The cumulative deposits/borrows a user has made into a market precision: token mint precision |
market_ | u16 | The market index of the corresponding spot market |
balance_ | SpotBalanceType | Whether the position is deposit or borrow |
open_orders | u8 | Number of open orders |
padding | [u8; 4] |
StakeAction#
Enum types::.
| Variant |
|---|
Stake |
UnstakeRequest |
UnstakeCancelRequest |
Unstake |
UnstakeTransfer |
StakeTransfer |
AdminDeposit |
SwapDirection#
Enum types::.
| Variant |
|---|
Add |
Remove |
SwapRecord#
Struct types::. Same fields as the SwapRecord event.
SwapReduceOnly#
Enum types::.
| Variant |
|---|
In |
Out |
TargetsDatum#
Struct types::.
| Field | Type |
|---|---|
cost_ | i32 |
padding | [u8; 4] |
target_base | i64 |
last_ | u64 |
last_ | u64 |
TokenProgramFlag#
Enum types::.
| Variant |
|---|
Token2022 |
TransferHook |
TransferProtocolIfSharesToRevenuePoolRecord#
Struct types::. Same fields as the TransferProtocolIfSharesToRevenuePoolRecord event.
TwapPeriod#
Enum types::.
| Variant |
|---|
FundingPeriod |
FiveMin |
UpdatePerpMarketSummaryStatsParams#
Struct types::.
| Field | Type |
|---|---|
quote_ | Option<i64> |
net_ | Option<i64> |
update_ | Option< |
exclude_ | Option< |
UserFees#
Struct types::.
| Field | Type | Description |
|---|---|---|
total_ | u64 | Total taker fee paid precision: QUOTE_PRECISION |
total_ | u64 | Total maker fee rebate precision: QUOTE_PRECISION |
total_ | u64 | Total discount from holding token precision: QUOTE_PRECISION |
total_ | u64 | Total discount from being referred precision: QUOTE_PRECISION |
total_ | u64 | Total reward to referrer precision: QUOTE_PRECISION |
current_ | u64 | Total reward to referrer this epoch precision: QUOTE_PRECISION |
UserStatsPausedOperations#
Enum types::.
| Variant |
|---|
UpdateBidAskTwap |
AmmAtomicFill |
AmmAtomicRiskIncreasingFill |
UserStatus#
Enum types::.
| Variant |
|---|
BeingLiquidated |
Bankrupt |
ReduceOnly |
AdvancedLp |
ProtectedMakerOrders |
ValidityGuardRails#
Struct types::.
| Field | Type |
|---|---|
slots_ | i64 |
slots_ | i64 |
confidence_ | u64 |
too_ | i64 |