Skip to content

Market Data Skill

The xbtfx-market-data skill provides AI agents with read-only access to symbol specifications, volume constraints, contract sizes, and live bid/ask prices.

  • Skill name: xbtfx-market-data
  • Type: Read-only
  • Required env var: XBTFX_API_KEY
  • Base URL: https://interface.xbtfx.com
  • Look up available trading symbols
  • Check volume constraints (min, max, step) before placing trades
  • Retrieve contract sizes and point values
  • Get the current bid/ask spread for a symbol
  • Verify trading hours and session times
EndpointMethodWeightDescription
/v1/symbolsGET2List all available trading symbols
/v1/symbols/:symbolGET1Get specification for a single symbol

List all available trading symbols and their specifications.

Get the specification for a single trading symbol.

Path Parameters:

ParameterTypeRequiredDescription
symbolstringYesSymbol name (e.g., BTCUSD)

Response Fields:

FieldTypeDescription
symbolstringSymbol name
descriptionstringHuman-readable description
currency_basestringBase currency
currency_profitstringProfit currency
currency_marginstringMargin currency
contract_sizenumberContract size per lot
volume_minnumberMinimum trade volume in lots
volume_maxnumberMaximum trade volume in lots
volume_stepnumberVolume increment step
digitsnumberPrice decimal places
pointnumberMinimum price change
spreadnumberCurrent spread in points
bidnumberCurrent bid price
asknumberCurrent ask price
trade_modestringTrading mode (e.g., full)
swap_longnumberSwap rate for long positions
swap_shortnumberSwap rate for short positions

Example:

Terminal window
GET /v1/symbols/BTCUSD
{
"symbol": "BTCUSD",
"description": "Bitcoin vs US Dollar",
"currency_base": "BTC",
"currency_profit": "USD",
"currency_margin": "USD",
"contract_size": 1,
"volume_min": 0.01,
"volume_max": 10.0,
"volume_step": 0.01,
"digits": 2,
"point": 0.01,
"spread": 50,
"bid": 65000.00,
"ask": 65000.50,
"trade_mode": "full",
"swap_long": -15.0,
"swap_short": -5.0
}

Before placing a trade, agents must validate the requested volume against the symbol specification. A valid volume must satisfy:

volume_min <= volume <= volume_max
(volume - volume_min) % volume_step == 0

Examples for BTCUSD (min: 0.01, max: 10.0, step: 0.01):

VolumeValidReason
0.01YesEquals volume_min
0.05YesWithin range, divisible by step
1.00YesWithin range, divisible by step
0.005NoBelow volume_min and not divisible by step
10.01NoExceeds volume_max

Agents using this skill must follow these behavioral rules:

  1. This is a read-only skill. These endpoints do not modify any account state.
  2. Always check symbol specs before trading. Call /v1/symbols/:symbol to verify volume constraints and trading availability before using the Trading Skill.
  3. Validate volume before trade requests. Use the volume validation formula to ensure the requested volume is valid for the instrument.
  4. Prefer the single-symbol endpoint. Use /v1/symbols/:symbol (weight 1) instead of /v1/symbols (weight 2) when you only need one symbol.
  5. Always mask API keys in output. Never display the full API key to the user.
  6. Respect rate limits. The full symbol list endpoint consumes 2 weight units. Avoid calling it repeatedly.
  7. Spread is in points, not price units. To convert spread to price: spread * point. For example, a spread of 50 with point 0.01 equals a price spread of 0.50.