AMM

Endpoints to fetch historical AMM data. For all AMM endpoints, the step size between data points is calculated automatically based on the requested number of samples (default = 11_000 max), with a minimum step size being 20 seconds. Thus the maximum queryable duration to still get a 20 second step size is about 220,000 seconds (approximately 2.54 days).

get

Fetch the AMM's position (inventory) over a specified time period.

Query parameters
marketNamestringRequired

The name of the market to get position data for (e.g., SOL-PERP)

Example: SOL-PERP
startinteger · int64Required

Start timestamp in seconds (must be less than end timestamp)

endinteger · int64Required

End timestamp in seconds (must be greater than start timestamp)

samplesinteger · max: 11000Optional

Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000.

Default: 11000
Responses
200

AMM position data

application/json
get
/amm/position
get

Fetch the AMM's bid and ask prices over a specified time period.

Query parameters
marketNamestringRequired

The name of the market to get bid-ask price data for (e.g., SOL-PERP)

Example: SOL-PERP
startinteger · int64Required

Start timestamp in seconds (must be less than end timestamp)

endinteger · int64Required

End timestamp in seconds (must be greater than start timestamp)

samplesinteger · max: 11000Optional

Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000.

Default: 11000
Responses
200

AMM bid-ask price data

application/json
get
/amm/bidAskPrice
get

Fetch the oracle price data for a market over a specified time period.

Query parameters
marketNamestringRequired

The name of the market to get oracle price data for (e.g., SOL-PERP)

Example: SOL-PERP
startinteger · int64Required

Start timestamp in seconds (must be less than end timestamp)

endinteger · int64Required

End timestamp in seconds (must be greater than start timestamp)

samplesinteger · max: 11000Optional

Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000.

Default: 11000
Responses
200

Oracle price data

application/json
get
/amm/oraclePrice
get

Fetch the long and short spread data for an AMM over a specified time period.

Query parameters
marketNamestringRequired

The name of the market to get spread data for (e.g., SOL-PERP)

Example: SOL-PERP
startinteger · int64Required

Start timestamp in seconds (must be less than end timestamp)

endinteger · int64Required

End timestamp in seconds (must be greater than start timestamp)

samplesinteger · max: 11000Optional

Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000.

Default: 11000
Responses
200

AMM spread data

application/json
get
/amm/spreads
get

Fetch the open interest data for a market over a specified time period.

Query parameters
marketNamestringRequired

The name of the market to get open interest data for (e.g., SOL-PERP)

Example: SOL-PERP
startinteger · int64Required

Start timestamp in seconds (must be less than end timestamp)

endinteger · int64Required

End timestamp in seconds (must be greater than start timestamp)

samplesinteger · max: 11000Optional

Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000.

Default: 11000
Responses
200

Open interest data

application/json
get
/amm/openInterest

Last updated