Jupiter Perpetuals decoder
Decode Jupiter Perpetuals instructions, accounts and events in Rust with the carbon-jupiter-perpetuals-decoder crate.
On this page
carbon-jupiter-perpetuals-decoder decodes the instructions, accounts and events of the Jupiter Perpetuals program (PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu): 59 instructions, 8 account types, 25 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-jupiter-perpetuals-decoder 2.0.0 |
| Install | cargo add carbon-jupiter-perpetuals-decoder@2. |
| Program ID | PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu (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-jupiter-perpetuals-decoder/2.0.0 |
| Source | decoders/jupiter-perpetuals-decoder |
Other perpetuals and derivatives decoders: Drift v2, 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 Jupiter Perpetuals transactions from the public RPC and prints every decoded AddCustody instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-jupiter-perpetuals-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_jupiter_perpetuals_decoder::{
instructions::JupiterPerpetualsInstruction, JupiterPerpetualsDecoder, 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(JupiterPerpetualsDecoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, JupiterPerpetualsInstruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, JupiterPerpetualsInstruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let JupiterPerpetualsInstruction::AddCustody { data, accounts, .. } = input.decoded_instruction {
println!("add_custody {signature}: {data:?} admin={}", accounts.admin);
}
Ok(())
}
}RUST_LOG=info cargo runEach AddCustody instruction prints one line with the transaction signature and the decoded AddCustody 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 JupiterPerpetualsInstruction:: (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 Pool 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_jupiter_perpetuals_decoder::{
accounts::JupiterPerpetualsAccount, JupiterPerpetualsDecoder, 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(JupiterPerpetualsDecoder, AccountLogger)
.build()?
.run()
.await
}
struct AccountLogger;
impl Processor<AccountProcessorInputType<'_, JupiterPerpetualsAccount>> for AccountLogger {
async fn process(
&mut self,
input: &AccountProcessorInputType<'_, JupiterPerpetualsAccount>,
) -> CarbonResult<()> {
if let JupiterPerpetualsAccount::Pool(pool) = &input.decoded_account.data {
println!("pool {}: {pool:?}", input.metadata.pubkey);
}
Ok(())
}
}RUST_LOG=info cargo runEach update to a Pool 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 JupiterPerpetualsInstruction. Each is JupiterPerpetualsInstruction::, 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
PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu. - 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.
AddCustody#
Discriminator f7fe7e111a06d775 · data AddCustody · accounts AddCustodyInstructionAccounts.
| Field | Type |
|---|---|
params | AddCustodyParams |
Required accounts: 10; extras go to remaining.
Fields of AddCustodyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | transfer_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | custody | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | custody_ | Pubkey |
| 7 | system_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | rent | Pubkey |
| 10… | remaining | Vec< |
AddLiquidity2#
Discriminator e4a24e1c46db7473 · data AddLiquidity2 · accounts AddLiquidity2InstructionAccounts.
| Field | Type |
|---|---|
params | AddLiquidity2Params |
Required accounts: 14; extras go to remaining.
Fields of AddLiquidity2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | funding_ | Pubkey |
| 2 | lp_ | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | custody | Pubkey |
| 7 | custody_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | lp_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | event_ | Pubkey |
| 13 | program | Pubkey |
| 14… | remaining | Vec< |
AddPool#
Discriminator 73e6d4d3af3127a9 · data AddPool · accounts AddPoolInstructionAccounts.
| Field | Type |
|---|---|
params | AddPoolParams |
Required accounts: 8; extras go to remaining.
Fields of AddPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | transfer_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | lp_ | Pubkey |
| 5 | system_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | rent | Pubkey |
| 8… | remaining | Vec< |
BorrowFromCustody#
Discriminator 99b741417121f92d · data BorrowFromCustody · accounts BorrowFromCustodyInstructionAccounts.
| Field | Type |
|---|---|
params | BorrowFromCustodyParams |
Required accounts: 12; extras go to remaining.
Fields of BorrowFromCustodyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | borrow_ | Pubkey |
| 6 | custody_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | lp_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | event_ | Pubkey |
| 11 | program | Pubkey |
| 12… | remaining | Vec< |
CloseBorrowPosition#
Discriminator cce291cde825038c · data CloseBorrowPosition · accounts CloseBorrowPositionInstructionAccounts.
| Field | Type |
|---|---|
params | CloseBorrowPositionParams |
Required accounts: 5; extras go to remaining.
Fields of CloseBorrowPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | borrow_ | Pubkey |
| 2 | system_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
ClosePositionRequest2#
Discriminator 7944a21cd82fc842 · data ClosePositionRequest2 · accounts ClosePositionRequest2InstructionAccounts.
No data fields.
Required accounts: 13; extras go to remaining.
Fields of ClosePositionRequest2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Option< |
| 1 | owner | Pubkey |
| 2 | owner_ata | Pubkey |
| 3 | pool | Pubkey |
| 4 | position_ | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position | Pubkey |
| 7 | mint | Pubkey |
| 8 | token_ | Pubkey |
| 9 | system_ | Pubkey |
| 10 | associated_ | Pubkey |
| 11 | event_ | Pubkey |
| 12 | program | Pubkey |
| 13… | remaining | Vec< |
ClosePositionRequest3#
Discriminator 7a822112d32ca13a · data ClosePositionRequest3 · accounts ClosePositionRequest3InstructionAccounts.
No data fields.
Required accounts: 14; extras go to remaining.
Fields of ClosePositionRequest3InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Option< |
| 1 | owner | Pubkey |
| 2 | owner_ata | Pubkey |
| 3 | pool | Pubkey |
| 4 | position_ | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position | Pubkey |
| 7 | custody | Pubkey |
| 8 | mint | Pubkey |
| 9 | token_ | Pubkey |
| 10 | system_ | Pubkey |
| 11 | associated_ | Pubkey |
| 12 | event_ | Pubkey |
| 13 | program | Pubkey |
| 14… | remaining | Vec< |
CreateAndDelegateStakeAccount#
Discriminator 62d17a1bde895e86 · data CreateAndDelegateStakeAccount · accounts CreateAndDelegateStakeAccountInstructionAccounts.
| Field | Type |
|---|---|
params | CreateAndDelegateStakeAccountParams |
Required accounts: 18; extras go to remaining.
Fields of CreateAndDelegateStakeAccountInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | transfer_ | Pubkey |
| 6 | stake_ | Pubkey |
| 7 | stake_info | Pubkey |
| 8 | validator_ | Pubkey |
| 9 | stake_ | Pubkey |
| 10 | wsol_mint | Pubkey |
| 11 | temp_ | Pubkey |
| 12 | rent | Pubkey |
| 13 | clock | Pubkey |
| 14 | stake_ | Pubkey |
| 15 | stake_ | Pubkey |
| 16 | system_ | Pubkey |
| 17 | token_ | Pubkey |
| 18… | remaining | Vec< |
CreateDecreasePositionMarketRequest#
Discriminator 4ac6c356c163014f · data CreateDecreasePositionMarketRequest · accounts CreateDecreasePositionMarketRequestInstructionAccounts.
| Field | Type |
|---|---|
params | CreateDecreasePositionMarketRequestParams |
Required accounts: 16; extras go to remaining.
Fields of CreateDecreasePositionMarketRequestInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | receiving_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | position | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | custody | Pubkey |
| 8 | collateral_ | Pubkey |
| 9 | desired_ | Pubkey |
| 10 | referral | Option< |
| 11 | token_ | Pubkey |
| 12 | associated_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
CreateDecreasePositionRequest2#
Discriminator 6940c952fa0e6d4d · data CreateDecreasePositionRequest2 · accounts CreateDecreasePositionRequest2InstructionAccounts.
| Field | Type |
|---|---|
params | CreateDecreasePositionRequest2Params |
Required accounts: 18; extras go to remaining.
Fields of CreateDecreasePositionRequest2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | receiving_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | position | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | custody | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | desired_ | Pubkey |
| 12 | referral | Option< |
| 13 | token_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15 | system_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | program | Pubkey |
| 18… | remaining | Vec< |
CreateIncreasePositionMarketRequest#
Discriminator b855c71869ab9c38 · data CreateIncreasePositionMarketRequest · accounts CreateIncreasePositionMarketRequestInstructionAccounts.
| Field | Type |
|---|---|
params | CreateIncreasePositionMarketRequestParams |
Required accounts: 16; extras go to remaining.
Fields of CreateIncreasePositionMarketRequestInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | funding_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | position | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | custody | Pubkey |
| 8 | collateral_ | Pubkey |
| 9 | input_mint | Pubkey |
| 10 | referral | Option< |
| 11 | token_ | Pubkey |
| 12 | associated_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
CreateTokenLedger#
Discriminator e8f2c5fdf08f8134 · data CreateTokenLedger · accounts CreateTokenLedgerInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of CreateTokenLedgerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | token_ | Pubkey |
| 1 | payer | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
CreateTokenMetadata#
Discriminator dd50b02599bca044 · data CreateTokenMetadata · accounts CreateTokenMetadataInstructionAccounts.
| Field | Type |
|---|---|
params | CreateTokenMetadataParams |
Required accounts: 9; extras go to remaining.
Fields of CreateTokenMetadataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | metadata | Pubkey |
| 5 | lp_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | system_ | Pubkey |
| 8 | rent | Pubkey |
| 9… | remaining | Vec< |
DecreasePosition4#
Discriminator b9a172af609403aa · data DecreasePosition4 · accounts DecreasePosition4InstructionAccounts.
| Field | Type |
|---|---|
params | DecreasePosition4Params |
Required accounts: 18; extras go to remaining.
Fields of DecreasePosition4InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | owner | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | custody_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | collateral_ | Pubkey |
| 14 | collateral_ | Pubkey |
| 15 | token_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | program | Pubkey |
| 18… | remaining | Vec< |
DecreasePositionWithInternalSwap#
Discriminator 8311996e77646126 · data DecreasePositionWithInternalSwap · accounts DecreasePositionWithInternalSwapInstructionAccounts.
| Field | Type |
|---|---|
params | DecreasePositionWithInternalSwapParams |
Required accounts: 22; extras go to remaining.
Fields of DecreasePositionWithInternalSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | owner | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | custody_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | collateral_ | Pubkey |
| 14 | collateral_ | Pubkey |
| 15 | dispensing_ | Pubkey |
| 16 | dispensing_ | Pubkey |
| 17 | dispensing_ | Pubkey |
| 18 | dispensing_ | Pubkey |
| 19 | token_ | Pubkey |
| 20 | event_ | Pubkey |
| 21 | program | Pubkey |
| 22… | remaining | Vec< |
DecreasePositionWithTpsl#
Discriminator 6c12cbd1e36741a5 · data DecreasePositionWithTpsl · accounts DecreasePositionWithTpslInstructionAccounts.
| Field | Type |
|---|---|
params | DecreasePositionWithTpslParams |
Required accounts: 16; extras go to remaining.
Fields of DecreasePositionWithTpslInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | owner | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
DecreasePositionWithTpslAndInternalSwap#
Discriminator 026fc8e723417beb · data DecreasePositionWithTpslAndInternalSwap · accounts DecreasePositionWithTpslAndInternalSwapInstructionAccounts.
| Field | Type |
|---|---|
params | DecreasePositionWithTpslAndInternalSwapParams |
Required accounts: 19; extras go to remaining.
Fields of DecreasePositionWithTpslAndInternalSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | owner | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position_ | Pubkey |
| 6 | position_ | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | dispensing_ | Pubkey |
| 14 | dispensing_ | Pubkey |
| 15 | dispensing_ | Pubkey |
| 16 | token_ | Pubkey |
| 17 | event_ | Pubkey |
| 18 | program | Pubkey |
| 19… | remaining | Vec< |
DepositCollateralForBorrows#
Discriminator 1102c3be4c10ee4a · data DepositCollateralForBorrows · accounts DepositCollateralForBorrowsInstructionAccounts.
| Field | Type |
|---|---|
params | DepositParams |
Required accounts: 13; extras go to remaining.
Fields of DepositCollateralForBorrowsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | borrow_ | Pubkey |
| 6 | collateral_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | lp_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | system_ | Pubkey |
| 11 | event_ | Pubkey |
| 12 | program | Pubkey |
| 13… | remaining | Vec< |
GetAddLiquidityAmountAndFee2#
Discriminator 6d9d37a908510476 · data GetAddLiquidityAmountAndFee2 · accounts GetAddLiquidityAmountAndFee2InstructionAccounts.
| Field | Type |
|---|---|
params | GetAddLiquidityAmountAndFee2Params |
Required accounts: 6; extras go to remaining.
Fields of GetAddLiquidityAmountAndFee2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | perpetuals | Pubkey |
| 1 | pool | Pubkey |
| 2 | custody | Pubkey |
| 3 | custody_ | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | lp_ | Pubkey |
| 6… | remaining | Vec< |
GetAssetsUnderManagement2#
Discriminator c1d20df971951d54 · data GetAssetsUnderManagement2 · accounts GetAssetsUnderManagement2InstructionAccounts.
| Field | Type |
|---|---|
params | GetAssetsUnderManagement2Params |
Required accounts: 2; extras go to remaining.
Fields of GetAssetsUnderManagement2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | perpetuals | Pubkey |
| 1 | pool | Pubkey |
| 2… | remaining | Vec< |
GetRemoveLiquidityAmountAndFee2#
Discriminator b73b486edff3968e · data GetRemoveLiquidityAmountAndFee2 · accounts GetRemoveLiquidityAmountAndFee2InstructionAccounts.
| Field | Type |
|---|---|
params | GetRemoveLiquidityAmountAndFee2Params |
Required accounts: 6; extras go to remaining.
Fields of GetRemoveLiquidityAmountAndFee2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | perpetuals | Pubkey |
| 1 | pool | Pubkey |
| 2 | custody | Pubkey |
| 3 | custody_ | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | lp_ | Pubkey |
| 6… | remaining | Vec< |
IncreasePosition4#
Discriminator 439335172b391043 · data IncreasePosition4 · accounts IncreasePosition4InstructionAccounts.
| Field | Type |
|---|---|
params | IncreasePosition4Params |
Required accounts: 16; extras go to remaining.
Fields of IncreasePosition4InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | position_ | Pubkey |
| 4 | position_ | Pubkey |
| 5 | position | Pubkey |
| 6 | custody | Pubkey |
| 7 | custody_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | collateral_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
IncreasePositionPreSwap#
Discriminator 1a88e1d916155314 · data IncreasePositionPreSwap · accounts IncreasePositionPreSwapInstructionAccounts.
| Field | Type |
|---|---|
params | IncreasePositionPreSwapParams |
Required accounts: 11; extras go to remaining.
Fields of IncreasePositionPreSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | keeper_ata | Pubkey |
| 2 | position_ | Pubkey |
| 3 | position_ | Pubkey |
| 4 | position | Pubkey |
| 5 | collateral_ | Pubkey |
| 6 | collateral_ | Pubkey |
| 7 | instruction | Pubkey |
| 8 | token_ | Pubkey |
| 9 | event_ | Pubkey |
| 10 | program | Pubkey |
| 11… | remaining | Vec< |
IncreasePositionWithInternalSwap#
Discriminator 72376a8cc7dd2070 · data IncreasePositionWithInternalSwap · accounts IncreasePositionWithInternalSwapInstructionAccounts.
| Field | Type |
|---|---|
params | IncreasePositionWithInternalSwapParams |
Required accounts: 20; extras go to remaining.
Fields of IncreasePositionWithInternalSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | position_ | Pubkey |
| 4 | position_ | Pubkey |
| 5 | position | Pubkey |
| 6 | custody | Pubkey |
| 7 | custody_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | collateral_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | receiving_ | Pubkey |
| 14 | receiving_ | Pubkey |
| 15 | receiving_ | Pubkey |
| 16 | receiving_ | Pubkey |
| 17 | token_ | Pubkey |
| 18 | event_ | Pubkey |
| 19 | program | Pubkey |
| 20… | remaining | Vec< |
Init#
Discriminator dc3bcfec6cfa2f64 · data Init · accounts InitInstructionAccounts.
| Field | Type |
|---|---|
params | InitParams |
Required accounts: 8; extras go to remaining.
Fields of InitInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | upgrade_ | Pubkey |
| 1 | admin | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | perpetuals_ | Pubkey |
| 5 | perpetuals_ | Pubkey |
| 6 | system_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
InstantCreateLimitOrder#
Discriminator c225c37b287f7e9c · data InstantCreateLimitOrder · accounts InstantCreateLimitOrderInstructionAccounts.
| Field | Type |
|---|---|
params | InstantCreateLimitOrderParams |
Required accounts: 20; extras go to remaining.
Fields of InstantCreateLimitOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | funding_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | position | Pubkey |
| 7 | position_ | Pubkey |
| 8 | position_ | Pubkey |
| 9 | custody | Pubkey |
| 10 | custody_ | Pubkey |
| 11 | custody_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | input_mint | Pubkey |
| 14 | referral | Option< |
| 15 | token_ | Pubkey |
| 16 | associated_ | Pubkey |
| 17 | system_ | Pubkey |
| 18 | event_ | Pubkey |
| 19 | program | Pubkey |
| 20… | remaining | Vec< |
InstantCreateTpsl#
Discriminator 7562427f1e3249b9 · data InstantCreateTpsl · accounts InstantCreateTpslInstructionAccounts.
| Field | Type |
|---|---|
params | InstantCreateTpslParams |
Required accounts: 20; extras go to remaining.
Fields of InstantCreateTpslInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | receiving_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | position | Pubkey |
| 7 | position_ | Pubkey |
| 8 | position_ | Pubkey |
| 9 | custody | Pubkey |
| 10 | custody_ | Pubkey |
| 11 | custody_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | desired_ | Pubkey |
| 14 | referral | Option< |
| 15 | token_ | Pubkey |
| 16 | associated_ | Pubkey |
| 17 | system_ | Pubkey |
| 18 | event_ | Pubkey |
| 19 | program | Pubkey |
| 20… | remaining | Vec< |
InstantDecreasePosition#
Discriminator 2e17f02c1e8a5e8c · data InstantDecreasePosition · accounts InstantDecreasePositionInstructionAccounts.
| Field | Type |
|---|---|
params | InstantDecreasePositionParams |
Required accounts: 22; extras go to remaining.
Fields of InstantDecreasePositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | receiving_ | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | perpetuals | Pubkey |
| 6 | pool | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | custody_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | collateral_ | Pubkey |
| 14 | collateral_ | Pubkey |
| 15 | desired_ | Pubkey |
| 16 | referral | Option< |
| 17 | token_ | Pubkey |
| 18 | associated_ | Pubkey |
| 19 | system_ | Pubkey |
| 20 | event_ | Pubkey |
| 21 | program | Pubkey |
| 22… | remaining | Vec< |
InstantDecreasePosition2#
Discriminator a2bfc83e8b3eb011 · data InstantDecreasePosition2 · accounts InstantDecreasePosition2InstructionAccounts.
| Field | Type |
|---|---|
params | InstantDecreasePosition2Params |
Required accounts: 22; extras go to remaining.
Fields of InstantDecreasePosition2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | receiving_ | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | perpetuals | Pubkey |
| 6 | pool | Pubkey |
| 7 | position | Pubkey |
| 8 | custody | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | desired_ | Pubkey |
| 14 | referral | Option< |
| 15 | position_ | Pubkey |
| 16 | position_ | Pubkey |
| 17 | token_ | Pubkey |
| 18 | associated_ | Pubkey |
| 19 | system_ | Pubkey |
| 20 | event_ | Pubkey |
| 21 | program | Pubkey |
| 22… | remaining | Vec< |
InstantIncreasePosition#
Discriminator a47e44b6dfa640b7 · data InstantIncreasePosition · accounts InstantIncreasePositionInstructionAccounts.
| Field | Type |
|---|---|
params | InstantIncreasePositionParams |
Required accounts: 20; extras go to remaining.
Fields of InstantIncreasePositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | funding_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | position | Pubkey |
| 7 | custody | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | collateral_ | Pubkey |
| 12 | collateral_ | Pubkey |
| 13 | collateral_ | Pubkey |
| 14 | token_ | Option< |
| 15 | referral | Option< |
| 16 | token_ | Pubkey |
| 17 | system_ | Pubkey |
| 18 | event_ | Pubkey |
| 19 | program | Pubkey |
| 20… | remaining | Vec< |
InstantIncreasePositionPreSwap#
Discriminator c52656a5c71726ea · data InstantIncreasePositionPreSwap · accounts InstantIncreasePositionPreSwapInstructionAccounts.
| Field | Type |
|---|---|
params | InstantIncreasePositionPreSwapParams |
Required accounts: 16; extras go to remaining.
Fields of InstantIncreasePositionPreSwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | funding_ | Pubkey |
| 2 | receiving_ | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | receiving_ | Pubkey |
| 7 | receiving_ | Pubkey |
| 8 | receiving_ | Pubkey |
| 9 | dispensing_ | Pubkey |
| 10 | dispensing_ | Pubkey |
| 11 | dispensing_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | instruction | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
InstantUpdateLimitOrder#
Discriminator 88f5e53a798d0ccf · data InstantUpdateLimitOrder · accounts InstantUpdateLimitOrderInstructionAccounts.
| Field | Type |
|---|---|
params | InstantUpdateLimitOrderParams |
Required accounts: 10; extras go to remaining.
Fields of InstantUpdateLimitOrderInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position | Pubkey |
| 6 | position_ | Pubkey |
| 7 | custody | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10… | remaining | Vec< |
InstantUpdateTpsl#
Discriminator 90e47225a5f26f65 · data InstantUpdateTpsl · accounts InstantUpdateTpslInstructionAccounts.
| Field | Type |
|---|---|
params | InstantUpdateTpslParams |
Required accounts: 12; extras go to remaining.
Fields of InstantUpdateTpslInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | api_keeper | Pubkey |
| 2 | owner | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | pool | Pubkey |
| 5 | position | Pubkey |
| 6 | position_ | Pubkey |
| 7 | custody | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | event_ | Pubkey |
| 11 | program | Pubkey |
| 12… | remaining | Vec< |
LiquidateBorrowPosition#
Discriminator ebc91185ea4854d2 · data LiquidateBorrowPosition · accounts LiquidateBorrowPositionInstructionAccounts.
| Field | Type |
|---|---|
params | LiquidateBorrowPositionParams |
Required accounts: 11; extras go to remaining.
Fields of LiquidateBorrowPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signer | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | borrow_ | Pubkey |
| 6 | collateral_ | Pubkey |
| 7 | lp_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | event_ | Pubkey |
| 10 | program | Pubkey |
| 11… | remaining | Vec< |
LiquidateFullPosition4#
Discriminator 40b05833a8bc9caf · data LiquidateFullPosition4 · accounts LiquidateFullPosition4InstructionAccounts.
| Field | Type |
|---|---|
params | LiquidateFullPosition4Params |
Required accounts: 13; extras go to remaining.
Fields of LiquidateFullPosition4InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signer | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | position | Pubkey |
| 4 | custody | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | custody_ | Pubkey |
| 7 | collateral_ | Pubkey |
| 8 | collateral_ | Pubkey |
| 9 | collateral_ | Pubkey |
| 10 | collateral_ | Pubkey |
| 11 | event_ | Pubkey |
| 12 | program | Pubkey |
| 13… | remaining | Vec< |
OperatorSetCustodyConfig#
Discriminator a6895ccc91e018da · data OperatorSetCustodyConfig · accounts OperatorSetCustodyConfigInstructionAccounts.
| Field | Type |
|---|---|
params | OperatorSetCustodyConfigParams |
Required accounts: 2; extras go to remaining.
Fields of OperatorSetCustodyConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | operator | Pubkey |
| 1 | custody | Pubkey |
| 2… | remaining | Vec< |
OperatorSetPoolConfig#
Discriminator 4cc95012c75cf669 · data OperatorSetPoolConfig · accounts OperatorSetPoolConfigInstructionAccounts.
| Field | Type |
|---|---|
params | OperatorSetPoolConfigParams |
Required accounts: 2; extras go to remaining.
Fields of OperatorSetPoolConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | operator | Pubkey |
| 1 | pool | Pubkey |
| 2… | remaining | Vec< |
PartialLiquidateBorrowPosition#
Discriminator faa60d4a61cc82d1 · data PartialLiquidateBorrowPosition · accounts PartialLiquidateBorrowPositionInstructionAccounts.
| Field | Type |
|---|---|
params | PartialLiquidateBorrowPositionParams |
Required accounts: 11; extras go to remaining.
Fields of PartialLiquidateBorrowPositionInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | signer | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | borrow_ | Pubkey |
| 6 | collateral_ | Pubkey |
| 7 | lp_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | event_ | Pubkey |
| 10 | program | Pubkey |
| 11… | remaining | Vec< |
ReallocCustody#
Discriminator 7b3a6d8b8507e1c8 · data ReallocCustody · accounts ReallocCustodyInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ReallocCustodyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | custody | Pubkey |
| 2 | system_ | Pubkey |
| 3 | rent | Pubkey |
| 4… | remaining | Vec< |
ReallocPool#
Discriminator 728025a747e328b2 · data ReallocPool · accounts ReallocPoolInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of ReallocPoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | pool | Pubkey |
| 2 | system_ | Pubkey |
| 3 | rent | Pubkey |
| 4… | remaining | Vec< |
RedeemStake#
Discriminator b2cbfa698576ff45 · data RedeemStake · accounts RedeemStakeInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of RedeemStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | stake_ | Pubkey |
| 5 | stake_info | Pubkey |
| 6… | remaining | Vec< |
RefreshAssetsUnderManagement#
Discriminator a200d737e10fb900 · data RefreshAssetsUnderManagement · accounts RefreshAssetsUnderManagementInstructionAccounts.
| Field | Type |
|---|---|
params | RefreshAssetsUnderManagementParams |
Required accounts: 4; extras go to remaining.
Fields of RefreshAssetsUnderManagementInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | lp_ | Pubkey |
| 4… | remaining | Vec< |
RemoveLiquidity2#
Discriminator e6d7527ff165e392 · data RemoveLiquidity2 · accounts RemoveLiquidity2InstructionAccounts.
| Field | Type |
|---|---|
params | RemoveLiquidity2Params |
Required accounts: 14; extras go to remaining.
Fields of RemoveLiquidity2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | receiving_ | Pubkey |
| 2 | lp_ | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | custody | Pubkey |
| 7 | custody_ | Pubkey |
| 8 | custody_ | Pubkey |
| 9 | custody_ | Pubkey |
| 10 | lp_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | event_ | Pubkey |
| 13 | program | Pubkey |
| 14… | remaining | Vec< |
RepayToCustody#
Discriminator d3dbb7def84a051a · data RepayToCustody · accounts RepayToCustodyInstructionAccounts.
| Field | Type |
|---|---|
params | RepayToCustodyParams |
Required accounts: 10; extras go to remaining.
Fields of RepayToCustodyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | borrow_ | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
SetCustodyConfig#
Discriminator 8561828fd7e524b0 · data SetCustodyConfig · accounts SetCustodyConfigInstructionAccounts.
| Field | Type |
|---|---|
params | SetCustodyConfigParams |
Required accounts: 3; extras go to remaining.
Fields of SetCustodyConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | custody | Pubkey |
| 3… | remaining | Vec< |
SetMaxGlobalSizes#
Discriminator 5902d218a7e30dd6 · data SetMaxGlobalSizes · accounts SetMaxGlobalSizesInstructionAccounts.
| Field | Type |
|---|---|
params | SetMaxGlobalSizesParams |
Required accounts: 3; extras go to remaining.
Fields of SetMaxGlobalSizesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | custody | Pubkey |
| 2 | pool | Pubkey |
| 3… | remaining | Vec< |
SetPerpetualsConfig#
Discriminator 504815bf1d792d6f · data SetPerpetualsConfig · accounts SetPerpetualsConfigInstructionAccounts.
| Field | Type |
|---|---|
params | SetPerpetualsConfigParams |
Required accounts: 2; extras go to remaining.
Fields of SetPerpetualsConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | perpetuals | Pubkey |
| 2… | remaining | Vec< |
SetPoolConfig#
Discriminator d857417d716eb978 · data SetPoolConfig · accounts SetPoolConfigInstructionAccounts.
| Field | Type |
|---|---|
params | SetPoolConfigParams |
Required accounts: 3; extras go to remaining.
Fields of SetPoolConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3… | remaining | Vec< |
SetTestTime#
Discriminator f2e7b1fb7e919f68 · data SetTestTime · accounts SetTestTimeInstructionAccounts.
| Field | Type |
|---|---|
params | SetTestTimeParams |
Required accounts: 2; extras go to remaining.
Fields of SetTestTimeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | perpetuals | Pubkey |
| 2… | remaining | Vec< |
SetTokenLedger#
Discriminator e455b9704e4f4d02 · data SetTokenLedger · accounts SetTokenLedgerInstructionAccounts.
No data fields.
Required accounts: 3; extras go to remaining.
Fields of SetTokenLedgerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | token_ | Pubkey |
| 1 | token_ | Pubkey |
| 2 | token_ | Pubkey |
| 3… | remaining | Vec< |
Swap2#
Discriminator 414b3f4ceb5b5b88 · data Swap2 · accounts Swap2InstructionAccounts.
| Field | Type |
|---|---|
params | Swap2Params |
Required accounts: 17; extras go to remaining.
Fields of Swap2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | funding_ | Pubkey |
| 2 | receiving_ | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | receiving_ | Pubkey |
| 7 | receiving_ | Pubkey |
| 8 | receiving_ | Pubkey |
| 9 | receiving_ | Pubkey |
| 10 | dispensing_ | Pubkey |
| 11 | dispensing_ | Pubkey |
| 12 | dispensing_ | Pubkey |
| 13 | dispensing_ | Pubkey |
| 14 | token_ | Pubkey |
| 15 | event_ | Pubkey |
| 16 | program | Pubkey |
| 17… | remaining | Vec< |
SwapWithTokenLedger#
Discriminator 8b8deec529d3ac13 · data SwapWithTokenLedger · accounts SwapWithTokenLedgerInstructionAccounts.
| Field | Type |
|---|---|
params | SwapWithTokenLedgerParams |
Required accounts: 17; extras go to remaining.
Fields of SwapWithTokenLedgerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | funding_ | Pubkey |
| 2 | receiving_ | Pubkey |
| 3 | transfer_ | Pubkey |
| 4 | perpetuals | Pubkey |
| 5 | pool | Pubkey |
| 6 | receiving_ | Pubkey |
| 7 | receiving_ | Pubkey |
| 8 | receiving_ | Pubkey |
| 9 | dispensing_ | Pubkey |
| 10 | dispensing_ | Pubkey |
| 11 | dispensing_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | instruction | Pubkey |
| 15 | event_ | Pubkey |
| 16 | program | Pubkey |
| 17… | remaining | Vec< |
TestInit#
Discriminator 30335c7a51137029 · data TestInit · accounts TestInitInstructionAccounts.
| Field | Type |
|---|---|
params | TestInitParams |
Required accounts: 6; extras go to remaining.
Fields of TestInitInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | upgrade_ | Pubkey |
| 1 | admin | Pubkey |
| 2 | transfer_ | Pubkey |
| 3 | perpetuals | Pubkey |
| 4 | system_ | Pubkey |
| 5 | token_ | Pubkey |
| 6… | remaining | Vec< |
TransferAdmin#
Discriminator 2af2426ae40a6f9c · data TransferAdmin · accounts TransferAdminInstructionAccounts.
| Field | Type |
|---|---|
params | TransferAdminParams |
Required accounts: 3; extras go to remaining.
Fields of TransferAdminInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | new_admin | Pubkey |
| 2 | perpetuals | Pubkey |
| 3… | remaining | Vec< |
Unstake#
Discriminator 5a5f6b2acd7c32e1 · data Unstake · accounts UnstakeInstructionAccounts.
No data fields.
Required accounts: 9; extras go to remaining.
Fields of UnstakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | operator | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | stake_ | Pubkey |
| 6 | stake_info | Pubkey |
| 7 | clock | Pubkey |
| 8 | stake_ | Pubkey |
| 9… | remaining | Vec< |
UpdateDecreasePositionRequest2#
Discriminator 90c8f9ff6cd9f974 · data UpdateDecreasePositionRequest2 · accounts UpdateDecreasePositionRequest2InstructionAccounts.
| Field | Type |
|---|---|
params | UpdateDecreasePositionRequest2Params |
Required accounts: 8; extras go to remaining.
Fields of UpdateDecreasePositionRequest2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | position | Pubkey |
| 4 | position_ | Pubkey |
| 5 | custody | Pubkey |
| 6 | custody_ | Pubkey |
| 7 | custody_ | Pubkey |
| 8… | remaining | Vec< |
WithdrawCollateralForBorrows#
Discriminator 75a03c52ede92eb6 · data WithdrawCollateralForBorrows · accounts WithdrawCollateralForBorrowsInstructionAccounts.
| Field | Type |
|---|---|
params | WithdrawParams |
Required accounts: 12; extras go to remaining.
Fields of WithdrawCollateralForBorrowsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | owner | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | transfer_ | Pubkey |
| 5 | borrow_ | Pubkey |
| 6 | collateral_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | lp_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | event_ | Pubkey |
| 11 | program | Pubkey |
| 12… | remaining | Vec< |
WithdrawFees2#
Discriminator fc808f91e1dd9fcf · data WithdrawFees2 · accounts WithdrawFees2InstructionAccounts.
| Field | Type |
|---|---|
params | WithdrawFees2Params |
Required accounts: 10; extras go to remaining.
Fields of WithdrawFees2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | transfer_ | Pubkey |
| 2 | perpetuals | Pubkey |
| 3 | pool | Pubkey |
| 4 | custody | Pubkey |
| 5 | custody_ | Pubkey |
| 6 | custody_ | Pubkey |
| 7 | custody_ | Pubkey |
| 8 | receiving_ | Pubkey |
| 9 | token_ | Pubkey |
| 10… | remaining | Vec< |
WithdrawStake#
Discriminator 9908168a69b05742 · data WithdrawStake · accounts WithdrawStakeInstructionAccounts.
No data fields.
Required accounts: 13; extras go to remaining.
Fields of WithdrawStakeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | keeper | Pubkey |
| 1 | perpetuals | Pubkey |
| 2 | pool | Pubkey |
| 3 | custody | Pubkey |
| 4 | custody_ | Pubkey |
| 5 | transfer_ | Pubkey |
| 6 | stake_ | Pubkey |
| 7 | stake_info | Pubkey |
| 8 | clock | Pubkey |
| 9 | stake_ | Pubkey |
| 10 | stake_ | Pubkey |
| 11 | system_ | Pubkey |
| 12 | token_ | Pubkey |
| 13… | 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 JupiterPerpetualsAccount. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
BorrowPosition#
Discriminator f38c148b20f37237 · accounts::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
custody | Pubkey |
open_time | i64 |
update_time | i64 |
borrow_size | u128 |
cumulative_ | u128 |
locked_ | u64 |
bump | u8 |
last_ | i64 |
Custody#
Discriminator 01b830515d833f91 · accounts::.
| Field | Type |
|---|---|
pool | Pubkey |
mint | Pubkey |
token_ | Pubkey |
decimals | u8 |
is_stable | bool |
oracle | OracleParams |
pricing | PricingParams |
permissions | Permissions |
target_ | u64 |
assets | Assets |
funding_ | FundingRateState |
bump | u8 |
token_ | u8 |
increase_ | u64 |
decrease_ | u64 |
max_ | u64 |
doves_ | Pubkey |
jump_ | JumpRateState |
doves_ | Pubkey |
price_ | PriceImpactBuffer |
borrow_ | BorrowLendParams |
borrows_ | FundingRateState |
debt | u128 |
borrow_ | u128 |
borrow_ | u64 |
min_ | u64 |
min_ | u64 |
total_ | u64 |
max_ | u64 |
external_ | u64 |
disable_ | bool |
withdrawal_ | u64 |
withdrawal_ | u64 |
withdrawal_ | i64 |
withdrawal_ | u64 |
Perpetuals#
Discriminator 1ca762bf68526cc4 · accounts::.
| Field | Type |
|---|---|
permissions | Permissions |
pools | Vec<Pubkey> |
admin | Pubkey |
transfer_ | u8 |
perpetuals_ | u8 |
inception_ | i64 |
Pool#
Discriminator f19a6d0411b16dbc · accounts::.
| Field | Type |
|---|---|
name | String |
custodies | Vec<Pubkey> |
aum_usd | u128 |
limit | Limit |
fees | Fees |
pool_apr | PoolApr |
max_ | i64 |
bump | u8 |
lp_ | u8 |
inception_ | i64 |
parameter_ | Secp256k1Pubkey |
aum_ | i64 |
max_ | u64 |
disable_ | bool |
max_ | u64 |
aum_ | u64 |
Position#
Discriminator aabc8fe47a40f7d0 · accounts::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
custody | Pubkey |
collateral_ | Pubkey |
open_time | i64 |
update_time | i64 |
side | Side |
price | u64 |
size_usd | u64 |
collateral_ | u64 |
realised_ | i64 |
cumulative_ | u128 |
locked_ | u64 |
bump | u8 |
PositionRequest#
Discriminator 0c26fac72e9a20d8 · accounts::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
custody | Pubkey |
position | Pubkey |
mint | Pubkey |
open_time | i64 |
update_time | i64 |
size_ | u64 |
collateral_ | u64 |
request_ | RequestChange |
request_ | RequestType |
side | Side |
price_ | Option<u64> |
jupiter_ | Option<u64> |
pre_ | Option<u64> |
trigger_ | Option<u64> |
trigger_ | Option< |
entire_ | Option< |
executed | bool |
counter | u64 |
bump | u8 |
referral | Option< |
StakeInfo#
Discriminator 423e44466cb3b7eb · accounts::.
| Field | Type |
|---|---|
pool | Pubkey |
stake_ | Pubkey |
current_ | u64 |
total_ | u64 |
last_ | i64 |
deactivating | bool |
stake_ | u64 |
bump | u8 |
TokenLedger#
Discriminator 9cf709bc366c554d · accounts::.
| Field | Type |
|---|---|
token_ | Pubkey |
amount | u64 |
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.
CreatePositionRequestEvent#
Discriminator 02ee5e3569d32eba · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
collateral_ | u64 |
price_ | Option<u64> |
jupiter_ | Option<u64> |
pre_ | Option<u64> |
request_ | u8 |
open_time | i64 |
referral | Option< |
InstantCreateTpslEvent#
Discriminator f236065f188d67c6 · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
collateral_ | u64 |
entire_ | bool |
open_time | i64 |
InstantUpdateTpslEvent#
Discriminator b1162f2578f61165 · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
collateral_ | u64 |
entire_ | bool |
update_time | i64 |
ClosePositionRequestEvent#
Discriminator 15225c9ee01db4f3 · events::.
| Field | Type |
|---|---|
entire_ | Option< |
executed | bool |
request_ | u8 |
request_ | u8 |
side | u8 |
position_ | Pubkey |
owner | Pubkey |
mint | Pubkey |
amount | u64 |
open_time | i64 |
IncreasePositionEvent#
Discriminator f5715534d6bb9984 · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | u8 |
position_ | u64 |
owner | Pubkey |
pool | Pubkey |
size_ | u64 |
collateral_ | u64 |
collateral_ | u64 |
price | u64 |
price_ | Option<u64> |
fee_token | u64 |
fee_usd | u64 |
open_time | i64 |
referral | Option< |
position_ | u64 |
funding_ | u64 |
price_ | u64 |
IncreasePositionPreSwapEvent#
Discriminator ed6b098b164b04d5 · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
transfer_ | u64 |
collateral_ | u64 |
DecreasePositionEvent#
Discriminator 409c2b4a6d83107f · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | u8 |
has_profit | bool |
pnl_delta | u64 |
owner | Pubkey |
pool | Pubkey |
size_ | u64 |
transfer_ | u64 |
transfer_ | Option<u64> |
price | u64 |
price_ | Option<u64> |
fee_usd | u64 |
open_time | i64 |
referral | Option< |
position_ | u64 |
funding_ | u64 |
price_ | u64 |
original_ | u64 |
position_ | u64 |
position_ | i64 |
position_ | u64 |
DecreasePositionPostSwapEvent#
Discriminator 17d210e962f55952 · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
swap_amount | u64 |
jupiter_ | Option<u64> |
LiquidateFullPositionEvent#
Discriminator 806547a880485654 · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
has_profit | bool |
pnl_delta | u64 |
owner | Pubkey |
pool | Pubkey |
transfer_ | u64 |
transfer_ | u64 |
price | u64 |
fee_usd | u64 |
liquidation_ | u64 |
open_time | i64 |
position_ | u64 |
funding_ | u64 |
price_ | u64 |
original_ | u64 |
position_ | u64 |
position_ | i64 |
position_ | u64 |
PoolSwapEvent#
Discriminator 286bd41adf8827dc · events::.
| Field | Type |
|---|---|
receiving_ | Pubkey |
dispensing_ | Pubkey |
pool_key | Pubkey |
amount_in | u64 |
amount_out | u64 |
swap_ | u64 |
amount_ | u64 |
fee_bps | u64 |
owner_key | Pubkey |
receiving_ | Pubkey |
PoolSwapExactOutEvent#
Discriminator 79760b0bc6428e73 · events::.
| Field | Type |
|---|---|
receiving_ | Pubkey |
dispensing_ | Pubkey |
pool_key | Pubkey |
amount_in | u64 |
amount_ | u64 |
amount_out | u64 |
swap_ | u64 |
fee_bps | u64 |
owner_key | Pubkey |
receiving_ | Pubkey |
AddLiquidityEvent#
Discriminator 1bb299ba2fc48c2d · events::.
| Field | Type |
|---|---|
custody_key | Pubkey |
pool_key | Pubkey |
token_ | u64 |
pre_ | u128 |
token_ | u64 |
fee_bps | u64 |
token_ | u64 |
mint_ | u64 |
lp_amount | u64 |
post_ | u128 |
RemoveLiquidityEvent#
Discriminator 8dc7b67b9f5ed766 · events::.
| Field | Type |
|---|---|
custody_key | Pubkey |
pool_key | Pubkey |
lp_ | u64 |
remove_ | u64 |
fee_bps | u64 |
remove_ | u64 |
token_ | u64 |
post_ | u128 |
InstantCreateLimitOrderEvent#
Discriminator 0aa3557381e050c0 · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
collateral_ | u64 |
open_time | i64 |
InstantIncreasePositionEvent#
Discriminator cdec3904d16a5745 · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
position_ | Pubkey |
owner | Pubkey |
pool | Pubkey |
size_ | u64 |
collateral_ | u64 |
collateral_ | u64 |
price | u64 |
price_ | u64 |
fee_token | u64 |
fee_usd | u64 |
open_time | i64 |
referral | Option< |
position_ | u64 |
funding_ | u64 |
price_ | u64 |
InstantDecreasePositionEvent#
Discriminator abad6a19efbe3a3b · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | u8 |
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
position_ | Pubkey |
desired_ | Pubkey |
has_profit | bool |
pnl_delta | u64 |
owner | Pubkey |
pool | Pubkey |
size_ | u64 |
transfer_ | u64 |
transfer_ | u64 |
price | u64 |
price_ | u64 |
fee_usd | u64 |
open_time | i64 |
referral | Option< |
position_ | u64 |
funding_ | u64 |
original_ | u64 |
position_ | u64 |
price_ | u64 |
position_ | i64 |
position_ | u64 |
position_ | Option< |
DepositCollateralEvent#
Discriminator a90e66949b8912eb · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
deposit_ | u64 |
user_ | Pubkey |
time | i64 |
WithdrawCollateralEvent#
Discriminator 91262e57be95fdbf · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
withdraw_ | u64 |
user_ | Pubkey |
custody | Pubkey |
previous_ | u64 |
collateral_ | u64 |
collateral_ | u64 |
margin_usd | u64 |
time | i64 |
BorrowFromCustodyEvent#
Discriminator 17798344a8460e4c · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
collateral_ | u64 |
collateral_ | u64 |
margin_usd | u64 |
update_time | i64 |
RepayToCustodyEvent#
Discriminator e83674afba18f9dd · events::.
| Field | Type |
|---|---|
owner | Pubkey |
pool | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
position_ | Pubkey |
size_ | u64 |
update_time | i64 |
interest | u128 |
LiquidateBorrowPositionEvent#
Discriminator 0b80fc3b31c038aa · events::.
| Field | Type |
|---|---|
position_ | Pubkey |
position_ | Pubkey |
position_ | u64 |
owner | Pubkey |
pool | Pubkey |
collateral_ | u64 |
collateral_ | u64 |
remaining_ | u64 |
custody_ | u64 |
total_ | u64 |
liquidation_ | u64 |
liquidation_ | i64 |
RedeemStakeEvent#
Discriminator 00f1548d8baada6e · events::.
| Field | Type |
|---|---|
custody | Pubkey |
stake_ | Pubkey |
stake_info | Pubkey |
stake_ | u64 |
custody_ | u64 |
current_ | u64 |
total_ | u64 |
redeem_time | i64 |
WithdrawStakeEvent#
Discriminator 2f55efd6cf1d9758 · events::.
| Field | Type |
|---|---|
custody | Pubkey |
stake_ | Pubkey |
stake_info | Pubkey |
stake_ | u64 |
custody_ | u64 |
total_ | u64 |
withdraw_ | u64 |
withdraw_ | i64 |
DelegateStakeEvent#
Discriminator 55874bdea8859fd4 · events::.
| Field | Type |
|---|---|
custody | Pubkey |
stake_ | Pubkey |
stake_info | Pubkey |
custody_ | u64 |
stake_ | u64 |
validator_ | Pubkey |
delegate_ | i64 |
WithdrawFeesEvent#
Discriminator ec768a5a8badb159 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
custody | Pubkey |
custody_ | Pubkey |
receiving_ | Pubkey |
total_ | u64 |
pool_ | u64 |
protocol_ | u64 |
total_ | u64 |
pool_ | u64 |
protocol_ | u64 |
pool_ | u64 |
apr_ | u64 |
apr_ | u64 |
apr_ | i64 |
pool_ | u64 |
pool_ | u64 |
curtime | i64 |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AddCustodyParams#
Struct types::.
| Field | Type |
|---|---|
is_stable | bool |
oracle | OracleParams |
pricing | PricingParams |
permissions | Permissions |
hourly_ | u64 |
target_ | u64 |
increase_ | u64 |
decrease_ | u64 |
doves_ | Pubkey |
max_ | u64 |
jump_rate | JumpRateState |
price_ | u64 |
price_ | f32 |
delta_ | u64 |
max_fee_bps | u64 |
doves_ | Pubkey |
AddLiquidity2Params#
Struct types::.
| Field | Type |
|---|---|
token_ | u64 |
min_ | u64 |
token_ | Option<u64> |
AddLiquidityEvent#
Struct types::. Same fields as the AddLiquidityEvent event.
AddPoolParams#
Struct types::.
AmountAndFee#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
fee | u64 |
fee_bps | u64 |
Assets#
Struct types::.
| Field | Type |
|---|---|
fees_ | u64 |
owned | u64 |
locked | u64 |
guaranteed_ | u64 |
global_ | u64 |
global_ | u64 |
BorrowFromCustodyEvent#
Struct types::. Same fields as the BorrowFromCustodyEvent event.
BorrowFromCustodyParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
BorrowLendParams#
Struct types::.
| Field | Type |
|---|---|
borrows_ | u64 |
maintainance_ | u64 |
protocol_ | u64 |
liquidation_ | u64 |
liquidation_ | u64 |
CloseBorrowPositionParams#
Struct types::.
No fields.
ClosePositionRequestEvent#
Struct types::. Same fields as the ClosePositionRequestEvent event.
CreateAndDelegateStakeAccountParams#
Struct types::.
| Field | Type |
|---|---|
stake_ | u64 |
stake_ | u64 |
CreateDecreasePositionMarketRequestParams#
Struct types::.
| Field | Type |
|---|---|
collateral_ | u64 |
size_ | u64 |
price_ | u64 |
jupiter_ | Option<u64> |
entire_ | Option< |
counter | u64 |
CreateDecreasePositionRequest2Params#
Struct types::.
| Field | Type |
|---|---|
collateral_ | u64 |
size_ | u64 |
request_ | RequestType |
price_ | Option<u64> |
jupiter_ | Option<u64> |
trigger_ | Option<u64> |
trigger_ | Option< |
entire_ | Option< |
counter | u64 |
CreateIncreasePositionMarketRequestParams#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
collateral_ | u64 |
side | Side |
price_ | u64 |
jupiter_ | Option<u64> |
counter | u64 |
CreatePositionRequestEvent#
Struct types::. Same fields as the CreatePositionRequestEvent event.
CreateTokenMetadataParams#
Struct types::.
| Field | Type |
|---|---|
name | String |
symbol | String |
uri | String |
DecreasePosition4Params#
Struct types::.
No fields.
DecreasePositionEvent#
Struct types::. Same fields as the DecreasePositionEvent event.
DecreasePositionPostSwapEvent#
Struct types::. Same fields as the DecreasePositionPostSwapEvent event.
DecreasePositionWithInternalSwapParams#
Struct types::.
No fields.
DecreasePositionWithTpslAndInternalSwapParams#
Struct types::.
No fields.
DecreasePositionWithTpslParams#
Struct types::.
No fields.
DelegateStakeEvent#
Struct types::. Same fields as the DelegateStakeEvent event.
DepositCollateralEvent#
Struct types::. Same fields as the DepositCollateralEvent event.
DepositParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
Fees#
Struct types::Fees.
| Field | Type |
|---|---|
swap_ | u64 |
stable_ | u64 |
add_ | u64 |
swap_bps | u64 |
tax_bps | u64 |
stable_ | u64 |
stable_ | u64 |
liquidation_ | u64 |
protocol_ | u64 |
FundingRateState#
Struct types::.
| Field | Type |
|---|---|
cumulative_ | u128 |
last_update | i64 |
hourly_ | u64 |
GetAddLiquidityAmountAndFee2Params#
Struct types::.
| Field | Type |
|---|---|
token_ | u64 |
GetAssetsUnderManagement2Params#
Struct types::.
| Field | Type |
|---|---|
mode | Option< |
GetRemoveLiquidityAmountAndFee2Params#
Struct types::.
| Field | Type |
|---|---|
lp_ | u64 |
IncreasePosition4Params#
Struct types::.
No fields.
IncreasePositionEvent#
Struct types::. Same fields as the IncreasePositionEvent event.
IncreasePositionPreSwapEvent#
Struct types::. Same fields as the IncreasePositionPreSwapEvent event.
IncreasePositionPreSwapParams#
Struct types::.
No fields.
IncreasePositionWithInternalSwapParams#
Struct types::.
No fields.
InitParams#
Struct types::.
| Field | Type |
|---|---|
allow_swap | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
InstantCreateLimitOrderEvent#
Struct types::. Same fields as the InstantCreateLimitOrderEvent event.
InstantCreateLimitOrderParams#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
collateral_ | u64 |
side | Side |
trigger_ | u64 |
trigger_ | bool |
counter | u64 |
request_ | i64 |
InstantCreateTpslEvent#
Struct types::. Same fields as the InstantCreateTpslEvent event.
InstantCreateTpslParams#
Struct types::.
| Field | Type |
|---|---|
collateral_ | u64 |
size_ | u64 |
trigger_ | u64 |
trigger_ | bool |
entire_ | bool |
counter | u64 |
request_ | i64 |
InstantDecreasePosition2Params#
Struct types::.
| Field | Type |
|---|---|
collateral_ | u64 |
size_ | u64 |
price_ | u64 |
entire_ | Option< |
request_ | i64 |
counter | u64 |
InstantDecreasePositionEvent#
Struct types::. Same fields as the InstantDecreasePositionEvent event.
InstantDecreasePositionParams#
Struct types::.
| Field | Type |
|---|---|
collateral_ | u64 |
size_ | u64 |
price_ | u64 |
entire_ | Option< |
request_ | i64 |
InstantIncreasePositionEvent#
Struct types::. Same fields as the InstantIncreasePositionEvent event.
InstantIncreasePositionParams#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
collateral_ | Option<u64> |
side | Side |
price_ | u64 |
request_ | i64 |
InstantIncreasePositionPreSwapParams#
Struct types::.
| Field | Type |
|---|---|
amount_in | u64 |
min_ | u64 |
InstantUpdateLimitOrderParams#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
trigger_ | u64 |
request_ | i64 |
InstantUpdateTpslEvent#
Struct types::. Same fields as the InstantUpdateTpslEvent event.
InstantUpdateTpslParams#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
trigger_ | u64 |
request_ | i64 |
JumpRateState#
Struct types::.
| Field | Type |
|---|---|
min_ | u64 |
max_ | u64 |
target_ | u64 |
target_ | u64 |
Limit#
Struct types::.
| Field | Type |
|---|---|
max_aum_usd | u128 |
token_ | u128 |
buffer | u64 |
LiquidateBorrowPositionEvent#
Struct types::. Same fields as the LiquidateBorrowPositionEvent event.
LiquidateBorrowPositionParams#
Struct types::.
No fields.
LiquidateFullPosition4Params#
Struct types::.
No fields.
LiquidateFullPositionEvent#
Struct types::. Same fields as the LiquidateFullPositionEvent event.
OperatorSetCustodyConfigParams#
Struct types::.
| Field | Type |
|---|---|
pricing | PricingParams |
hourly_ | u64 |
target_ | u64 |
increase_ | u64 |
decrease_ | u64 |
max_ | u64 |
jump_rate | JumpRateState |
price_ | u64 |
price_ | f32 |
delta_ | u64 |
max_fee_bps | u64 |
borrow_ | BorrowLendParams |
borrow_ | u64 |
borrow_ | u64 |
min_ | u64 |
min_ | u64 |
max_ | u64 |
external_ | u64 |
disable_ | bool |
withdrawal_ | u64 |
withdrawal_ | u64 |
OperatorSetPoolConfigParams#
Struct types::.
| Field | Type |
|---|---|
fees | Fees |
limit | Limit |
max_ | i64 |
max_ | u64 |
disable_ | bool |
max_ | u64 |
OracleParams#
Struct types::.
| Field | Type |
|---|---|
oracle_ | Pubkey |
oracle_type | OracleType |
buffer | u64 |
max_ | u32 |
OraclePrice#
Struct types::.
| Field | Type |
|---|---|
price | u64 |
exponent | i32 |
OracleType#
Enum types::.
| Variant |
|---|
None |
Test |
Pyth |
PartialLiquidateBorrowPositionParams#
Struct types::.
No fields.
Permissions#
Struct types::.
| Field | Type |
|---|---|
allow_swap | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
PoolApr#
Struct types::.
| Field | Type |
|---|---|
last_ | i64 |
fee_apr_bps | u64 |
realized_ | u64 |
PoolSwapEvent#
Struct types::. Same fields as the PoolSwapEvent event.
PoolSwapExactOutEvent#
Struct types::. Same fields as the PoolSwapExactOutEvent event.
Price#
Struct types::.
| Field | Type |
|---|---|
price | u64 |
expo | i32 |
publish_ | i64 |
PriceCalcMode#
Enum types::.
| Variant |
|---|
Min |
Max |
Ignore |
PriceImpactBuffer#
Struct types::.
| Field | Type |
|---|---|
open_ | [i64; 60] |
last_ | i64 |
fee_factor | u64 |
exponent | f32 |
delta_ | u64 |
max_fee_bps | u64 |
PriceImpactMechanism#
Enum types::.
| Variant |
|---|
TradeSize |
DeltaImbalance |
PriceStaleTolerance#
Enum types::.
| Variant |
|---|
Strict |
Loose |
PricingParams#
Struct types::.
| Field | Type |
|---|---|
trade_ | u64 |
buffer | u64 |
swap_spread | u64 |
max_ | u64 |
max_ | u64 |
max_ | u64 |
RedeemStakeEvent#
Struct types::. Same fields as the RedeemStakeEvent event.
RefreshAssetsUnderManagementParams#
Struct types::.
No fields.
RemoveLiquidity2Params#
Struct types::.
| Field | Type |
|---|---|
lp_ | u64 |
min_ | u64 |
RemoveLiquidityEvent#
Struct types::. Same fields as the RemoveLiquidityEvent event.
RepayToCustodyEvent#
Struct types::. Same fields as the RepayToCustodyEvent event.
RepayToCustodyParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
RequestChange#
Enum types::.
| Variant |
|---|
None |
Increase |
Decrease |
RequestType#
Enum types::.
| Variant |
|---|
Market |
Trigger |
Secp256k1Pubkey#
Struct types::.
| Field | Type |
|---|---|
prefix | u8 |
key | [u8; 32] |
SetCustodyConfigParams#
Struct types::.
| Field | Type |
|---|---|
oracle | OracleParams |
pricing | PricingParams |
permissions | Permissions |
hourly_ | u64 |
target_ | u64 |
increase_ | u64 |
decrease_ | u64 |
doves_ | Pubkey |
max_ | u64 |
jump_rate | JumpRateState |
price_ | u64 |
price_ | f32 |
delta_ | u64 |
max_fee_bps | u64 |
doves_ | Pubkey |
borrow_ | BorrowLendParams |
borrow_ | u64 |
borrow_ | u64 |
min_ | u64 |
min_ | u64 |
max_ | u64 |
external_ | u64 |
disable_ | bool |
withdrawal_ | u64 |
withdrawal_ | u64 |
SetMaxGlobalSizesParams#
Struct types::.
| Field | Type |
|---|---|
max_ | u64 |
max_ | u64 |
recovery_id | u8 |
signature | [u8; 64] |
reference_ | [u8; 16] |
timestamp | u64 |
SetPerpetualsConfigParams#
Struct types::.
| Field | Type |
|---|---|
permissions | Permissions |
SetPoolConfigParams#
Struct types::.
| Field | Type |
|---|---|
fees | Fees |
limit | Limit |
max_ | i64 |
parameter_ | Secp256k1Pubkey |
max_ | u64 |
disable_ | bool |
max_ | u64 |
SetTestTimeParams#
Struct types::.
| Field | Type |
|---|---|
time | i64 |
Side#
Enum types::Side.
| Variant |
|---|
None |
Long |
Short |
Swap2Params#
Struct types::.
| Field | Type |
|---|---|
amount_in | u64 |
min_ | u64 |
SwapWithTokenLedgerParams#
Struct types::.
| Field | Type |
|---|---|
min_ | u64 |
TestInitParams#
Struct types::.
| Field | Type |
|---|---|
allow_swap | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
allow_ | bool |
TradePoolType#
Enum types::.
| Variant |
|---|
Increase |
Decrease |
TransferAdminParams#
Struct types::.
No fields.
UpdateDecreasePositionRequest2Params#
Struct types::.
| Field | Type |
|---|---|
size_ | u64 |
trigger_ | u64 |
WithdrawCollateralEvent#
Struct types::. Same fields as the WithdrawCollateralEvent event.
WithdrawFees2Params#
Struct types::.
No fields.
WithdrawFeesEvent#
Struct types::. Same fields as the WithdrawFeesEvent event.
WithdrawParams#
Struct types::.
| Field | Type |
|---|---|
amount | u64 |
WithdrawStakeEvent#
Struct types::. Same fields as the WithdrawStakeEvent event.