GLAMIDL Reference

Phoenix Integration Staging

Integration adapter for Phoenix. Lets a GLAM vault register Phoenix trader accounts, deposit or withdraw funds, place and cancel Phoenix orders, move collateral between trader accounts, and sync trader state under GLAM authorization. This staging deployment exposes additional or pre-release functionality for review.

Accounts owned or controlled

AccountOwner / authorityPurpose
Integration authority PDAPhoenix Integration StagingProgram-derived authority used for integration-level signing during Phoenix CPI calls.
Phoenix trader accountsPhoenixTrader accounts registered to, refreshed for, and priced as GLAM vault-controlled positions.

Instructions

16 total
InstructionDescription
cancel_allCancels all of the trader's resting orders on the market identified by the orderbook account.
cancel_orders_by_idCancels specific resting orders by their order IDs.
cancel_up_toCancels orders on one side of the book up to an optional count and/or tick limit.
depositEmber deposit: converts the vault's input mint into the Phoenix-side output mint.
deposit_fundsDeposits base or quote mint tokens from the vault's token account into the Phoenix trader account.
place_limit_orderPlaces a limit order; the unfilled portion rests on the orderbook.
place_market_orderPlaces an immediate-or-cancel market order; unfilled size is dropped rather than rested.
place_multi_limit_orderPlaces multiple limit orders (bids and/or asks) on a single market in one CPI.
register_traderInitializes a Phoenix trader account (parent or child subaccount) owned by the vault.
set_phoenix_policySets the GLAM Phoenix policy (market allowlist, order types, and price-deviation limits) on the vault state.
sync_parent_to_childSyncs collateral and state from a parent trader account down to a child subaccount.
transfer_collateralTransfers collateral from a source trader subaccount to a destination trader subaccount.
transfer_collateral_child_to_parentTransfers collateral from a child subaccount back to its parent trader account.
update_trader_stateRefreshes the trader account's cached state (PnL, funding, margin) against current market data.
withdrawEmber withdraw: converts the Phoenix-side output mint back to the input mint; `None` = full balance.
withdraw_fundsWithdraws base or quote mint tokens from the Phoenix trader account back to the vault's token account.