PhoenixPerpetualsDocs API v1
Get an API key

Trading

Venues and trading hours⁠.

A market's options (the same asset on another venue, or on Standard Market Hours), how to list and trade them, and the one rule they share.

View as Markdown

On this page
  1. Listing them
  2. Trading them
  3. Standard Market Hours

Some assets trade in more than one way: Bitcoin on Binance, on Bybit and on Hyperliquid, or the US 500 around the clock and on Standard Market Hours. Each way is a market of its own, with its own price, its own rules and its own positions. The API lists them together, under the asset's main market.

Listing them#

GET /v1/markets lists each main market once. A market that has options carries them in options, the market itself first:

{
  "market": "BTC-USD",
  "venue": "Binance",
  "trading_hours": "24/7",
  "option_of": null,
  "options": [
    { "market": "BTC-USD", "venue": "Binance", "trading_hours": "24/7" },
    { "market": "BTC-USD.BYBIT", "venue": "Bybit", "trading_hours": "24/7" },
    { "market": "BTC-USD.HYPERLIQUID", "venue": "Hyperliquid", "trading_hours": "24/7" }
  ]
}

options is null when the market is the only way to trade the asset. Take the ids from options: never build one from a venue's name.

Every market says where and when it trades:

FieldWhat it says
venueThe venue whose prices and fills it follows: Binance, Bybit, Hyperliquid, Ostium. null for a currency on FX hours
trading_hours24/7 (around the clock), standard (its underlying market's sessions, closed on weekends) or fx (FX hours)
option_ofFor an option, its main market; null for a main market

GET /v1/markets/{market} answers an option too, with its own tick_size, size_step, leverage and fee: read them there, they can differ from the main market's. GET /v1/markets/stats and the market stream carry each option under its own id.

Trading them#

Name the option in the order's market, as you would any market. Its positions, orders, fills, events and webhooks carry that id.

One way at a time. An account trades an asset in one of its markets at a time. While it holds a position or working orders on one of them, an order on another is refused with market_option_held (rule_rejection, 422), and details.held_market names the one it holds. Close that position and cancel its orders first, or trade details.held_market.

A key or a TradingView link limited to some markets covers their options: a key limited to BTC-USD may trade BTC-USD.BYBIT, and its cancel-all reaches both.

Standard Market Hours#

A market on Standard Market Hours (trading_hours: "standard") follows its underlying market:

  • It trades only while that market is open. Closed, its price stays still: a market order is refused with market_closed, while limit, stop and take profit orders can still be placed and wait for the reopening.
  • Its positions are closed before the weekend, 15 minutes before the weekend close, for you. From then until it reopens, an order that would open a position is refused with weekend_close, and so is an order on a position being closed. A market on FX hours (trading_hours: "fx") closes for the weekend the same way.

Its main market (trading_hours: "24/7") trades through nights, weekends and holidays, and outside market hours its price can move away from the underlying market's.

Guides, endpoints, fields and error codes.