GET/v0/midnight/books/{market_id}/{side}/quote
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/morpho/v0/midnight/books/{market_id}/{side}/quoteCache cached 10s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeCompute a bundle-ready fixed-rate quote and average execution price for target units or assets.
Try this endpoint
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/morpho/v0/midnight/books/0x00ed1d20239dcb000ae065100feb7e9379ec143b0f615a8f5be59153b741e68d/bids/quote?units=1000000"Parameters
| name | in | type | description | |
|---|---|---|---|---|
market_id | path | str | required | 32-byte Midnight active orderbook market ID. example: 0x00ed1d20239dcb000ae065100feb7e9379ec143b0f615a8f5be59153b741e68d |
side | path | strasks | bids | required | Orderbook side ('asks' or 'bids'). example: bids |
units | query | str | optional | Target market units (base units). example: 1000000 |
assets | query | str | optional | Target loan asset amount (base units). |
Response
type: object
pagination: none
sample: {
"data": "object"
}