Get Market Price
Returns the top-of-book price for a given token and side: the best ask when buying, or the best bid when selling. If no orders exist in the book, the endpoint falls back to the seed price stored in the database.
Endpoint
Section titled “Endpoint”GET /price
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) |
side | string | No | BUY or SELL. Default: BUY |
Response
Section titled “Response”{ "price": 0.45}| Field | Type | Description |
|---|---|---|
price | number | Market price as a floating-point number |
Example
Section titled “Example”curl "https://api.openfish.fun/price?token_id=0xabc123...&side=BUY"