Get Midpoint Price
Returns the midpoint between the best bid and best ask for a given token. When the order book has no resting orders, the endpoint falls back to the seed price stored in the database.
Endpoint
Section titled “Endpoint”GET /midpoint
Base URL: https://api.openfish.fun
Authentication
Section titled “Authentication”None required.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
token_id | string | Yes | Token ID (asset ID) |
Response
Section titled “Response”{ "mid": "0.4500"}| Field | Type | Description |
|---|---|---|
mid | string | Midpoint price formatted to 4 decimal places |
Example
Section titled “Example”curl "https://api.openfish.fun/midpoint?token_id=0xabc123..."