Skip to main content
Resolve Markets
curl --request GET \
  --url https://api.longshot.xyz/v1/markets/current
{
  "market.market_id": {},
  "market.asset": "<string>",
  "market.duration_secs": {},
  "market.start_at_ms": {},
  "market.betting_closes_at_ms": {}
}
Use bounded market lookup endpoints to resolve the market_id for an RFQ leg. There is no full market catalog endpoint.

Current Market

GET https://api.longshot.xyz/v1/markets/current?asset=BTC&duration_secs=300
Returns the current RFQ-eligible market window for the requested asset and duration. Once the current window reaches the betting-close buffer, this endpoint advances to the next window.

Exact Window Lookup

GET https://api.longshot.xyz/v1/markets/lookup?asset=BTC&duration_secs=300&window_start_ms=1778014800000
Returns the RFQ-eligible market for a specific aligned window start.

Query Parameters

asset
string
required
Asset symbol, for example BTC, ETH, or SOL.
duration_secs
int32
required
Window duration in seconds. Crypto Up/Down markets commonly use 300 for 5m and 900 for 15m.
window_start_ms
int64
Required only for /v1/markets/lookup. Window start as Unix milliseconds.

Response

200
{
  "market": {
    "market_id": 61619,
    "asset": "BTC",
    "duration_secs": 300,
    "start_at_ms": 1778014800000,
    "betting_closes_at_ms": 1778015095000
  }
}
market.market_id
int64
Market ID to submit in order.legs[].market_id.
market.asset
string
Asset symbol.
market.duration_secs
int32
Window duration in seconds.
market.start_at_ms
int64
Window start as Unix milliseconds.
market.betting_closes_at_ms
int64
Last timestamp, in Unix milliseconds, when taker RFQs should be submitted.

Example

cURL
curl --request GET \
  --url 'https://api.longshot.xyz/v1/markets/current?asset=BTC&duration_secs=300'