Repository navigation
Implement bitget /swap adapter for solana solver - #5107
AryanGodara wants to merge 5 commits into
Conversation
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…dapter Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…to aryan/be-253-bitget-adapter Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…to aryan/be-253-bitget-adapter Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…test, trim docs Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
|
Claude finished @AryanGodara's task in 2m 1s —— View job PR Review: Bitget
|
| instruction_lists: Vec<ApiInstruction>, | ||
| #[serde_as(as = "Vec<DisplayFromStr>")] | ||
| address_lookup_table_account: Vec<Pubkey>, |
There was a problem hiding this comment.
Unlike the Jupiter DTO (which marks address_lookup_table_addresses, setup_instructions, and cleanup_instruction with #[serde(default)]), neither instruction_lists nor address_lookup_table_account has a default here. If Bitget ever omits (or sends null for) addressLookupTableAccount — e.g. a direct route that uses no lookup tables — deserialization fails outright and the order is silently dropped as BadResponse instead of being quoted. Consider adding #[serde(default)] to be defensive and consistent with the Jupiter adapter:
| instruction_lists: Vec<ApiInstruction>, | |
| #[serde_as(as = "Vec<DisplayFromStr>")] | |
| address_lookup_table_account: Vec<Pubkey>, | |
| instruction_lists: Vec<ApiInstruction>, | |
| #[serde(default)] | |
| #[serde_as(as = "Vec<DisplayFromStr>")] | |
| address_lookup_table_account: Vec<Pubkey>, |
There was a problem hiding this comment.
"Every /swap response i saw had addressLookupTableAccount, and a missing field already logs as quote failed.
Description
Makes the Bitget engine quote real sell orders. Each order is one signed call to Bitget's
/swapendpoint. This version doesn't need Bitget to co-sign, and pays Bitget's 1 bp fee on every order instead. Sell orders only; buy orders return order-not-supported.Changes
POST /swapper order, with marketbgwaggregator(which skips/quote) and amounts in atoms.minAmountinto the settlement's buy buffer. Positive slippage stays with the solver.max-accounts(sent assolMaxAccounts, default 48) leaves room for the settlement's own 7–8 accounts within the 64-account limit.dex/dto.rs, shared by both adapters.How to test
Closes BE-253