All programsStaging
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
| Account | Owner / authority | Purpose |
|---|---|---|
| Integration authority PDA | Phoenix Integration Staging | Program-derived authority used for integration-level signing during Phoenix CPI calls. |
| Phoenix trader accounts | Phoenix | Trader accounts registered to, refreshed for, and priced as GLAM vault-controlled positions. |
Instructions
16 total
| Instruction | Description |
|---|---|
| cancel_all | Cancels all of the trader's resting orders on the market identified by the orderbook account. |
| cancel_orders_by_id | Cancels specific resting orders by their order IDs. |
| cancel_up_to | Cancels orders on one side of the book up to an optional count and/or tick limit. |
| deposit | Ember deposit: converts the vault's input mint into the Phoenix-side output mint. |
| deposit_funds | Deposits base or quote mint tokens from the vault's token account into the Phoenix trader account. |
| place_limit_order | Places a limit order; the unfilled portion rests on the orderbook. |
| place_market_order | Places an immediate-or-cancel market order; unfilled size is dropped rather than rested. |
| place_multi_limit_order | Places multiple limit orders (bids and/or asks) on a single market in one CPI. |
| register_trader | Initializes a Phoenix trader account (parent or child subaccount) owned by the vault. |
| set_phoenix_policy | Sets the GLAM Phoenix policy (market allowlist, order types, and price-deviation limits) on the vault state. |
| sync_parent_to_child | Syncs collateral and state from a parent trader account down to a child subaccount. |
| transfer_collateral | Transfers collateral from a source trader subaccount to a destination trader subaccount. |
| transfer_collateral_child_to_parent | Transfers collateral from a child subaccount back to its parent trader account. |
| update_trader_state | Refreshes the trader account's cached state (PnL, funding, margin) against current market data. |
| withdraw | Ember withdraw: converts the Phoenix-side output mint back to the input mint; `None` = full balance. |
| withdraw_funds | Withdraws base or quote mint tokens from the Phoenix trader account back to the vault's token account. |