Pacifica
Trade Pacifica perpetuals and spot through the shared CLI, bot, strategy and Python execution layer.
| Setting | Value |
|---|---|
| Authentication | mlab auth set pacifica --agent --account <SOLANA_OWNER_ADDRESS> |
| Perpetual venue | pacificaf |
| Spot venue | pacifica |
| Network | Mainnet; optional --testnet |
| Perpetual symbol | Base asset, such as BTC |
| Spot symbol | Exact pair, such as SOL/USDC |
Both products use the same Pacifica account and authorized agent for the selected network. Spot inventory and perpetual collateral have different meanings even when Pacifica exposes them through one unified account. Market Lab reads the asset inventory for spot sells and available margin for perpetual orders.
Connect an account
Create an API agent in Pacifica and authorize it for the owner account. Import that approved agent:
mlab auth set pacifica --agent --account <SOLANA_OWNER_ADDRESS>Paste its base58-encoded Solana keypair at the hidden prompt. Market Lab stores the delegated agent, not the owner's wallet key. The CLI does not automatically authorize an unapproved agent.
Mainnet and testnet credentials are separate:
mlab auth set pacifica --agent --account <SOLANA_OWNER_ADDRESS> --testnetUse --replace when replacing an existing credential. Server integrations can pass the agent through --agent-stdin --output json; never put a private key in a command argument or script source.
In Furge, open Accounts → Pacifica → Connect and approve the trading agent using the Solana wallet. The workspace network determines which Pacifica account is connected.
Optional API configuration key
Standalone CLI clients can read PACIFICA_API_CONFIG_KEY from their environment. When present, Market Lab sends it as the PF-API-KEY header on Pacifica HTTP and WebSocket connections. It configures upstream API access/rate limits; it does not replace the approved trading agent or grant permission to trade an account. Public market data and the base API do not require this key.
Managed Furge runtimes use the node gateway. The operator supplies providers.pacifica_api_config_key in the private node configuration, or the PACIFICA_API_CONFIG_KEY environment variable. The gateway owns the upstream header; users do not put this key in their scripts or runtime policy.
Furge builder fees
Pacifica builder codes have fixed registered fee rates. A 5 bps manual fee and a 1 bps automated fee require two different codes, registered upstream at exactly those rates and owned by the configured Solana builder account.
The node's server-owned pacifica fee schedule contains:
{
"provider": "pacifica",
"recipient": "FURGEMANUAL",
"automation_recipient": "FURGEBOTS",
"builder_account": "<SOLANA_BUILDER_OWNER_ADDRESS>",
"manual_bps": 5,
"automation_bps": 1,
"revision": 1
}The names above are placeholders, not pre-registered codes. recipient selects the manual code; automation_recipient selects the automated code; builder_account identifies their owner. Operators manage this schedule through the control plane's fee settings, not marketlab.toml.
The wallet owner approves the required codes during connection. The runtime verifies both the user's approvals and the upstream registered rates. A missing approval, unknown code, or mismatched rate blocks execution; Market Lab does not silently use another rate or remove the builder fee.
Perpetual orders
Refresh the catalog and inspect an order without submitting it:
mlab markets --exchange pacificaf --refresh
mlab trade long BTC \
--venue pacificaf --margin 100 --leverage 5 --dry-runAdd --testnet to select the public testnet. The provider validates its live market metadata on that network, including tick/lot increments, minimum notional and maximum leverage. Perpetual funding uses an hourly interval.
Spot orders
Spot uses the pair rather than the perpetual base symbol:
mlab trade buy SOL/USDC \
--venue pacifica --margin 100 --dry-run
mlab trade sell SOL/USDC \
--venue pacifica --size 0.1 --dry-runA spot sell spends available base inventory. It does not open a perpetual short. Spot orders use 1× exposure and cannot set perpetual leverage or reduce-only flags.
Shared execution
Pacifica supports market and limit orders, GTC/IOC/post-only limits, cancellation, and perpetual reduce-only closing through the common execution provider. Perpetual position protection uses Pacifica's native TP/SL operation. Each action in an exchange batch is signed and reconciled individually; the result of one action does not imply that the others succeeded.
Manual trades, scheduled strategies, paired bots, market makers and Python V2 use the same provider and account state. Market-making bots and scripts can use the WebSocket trading path; ordinary manual and scheduled execution use the request path selected by the shared execution layer. Account streams update orders and fills, with history reconciliation after a reconnect.
See Execution, Authentication, Pacifica market data, and Pacifica Python scripts.