Quotes API (Market Making)
Submit and manage two-sided quotes for market making.
Required Scope
All write operations require the MARKET_MAKING scope on your API key.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST /api/sdk/quotes | Submit a new quote | |
| GET /api/sdk/quotes | List quotes | |
| GET /api/sdk/quotes/:quoteId | Get quote by ID | |
| PATCH /api/sdk/quotes/:quoteId | Update a quote | |
| DELETE /api/sdk/quotes/:quoteId | Cancel a quote | |
| DELETE /api/sdk/quotes | Cancel all quotes | |
| PATCH /api/sdk/quotes/batch/update | Bulk update quotes |
The Quote Object
{
"quoteId": "quote_abc123def456",
"clientQuoteId": "my-quote-001",
"asset": "BTC",
"bidPrice": 49900.00,
"askPrice": 50100.00,
"bidSize": 5.0,
"askSize": 5.0,
"bidFilled": 1.0,
"askFilled": 0,
"status": "active",
"validForSeconds": 30,
"expiresAt": "2024-01-15T10:30:30.000Z",
"metadata": {
"strategy": "market_making"
},
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
Attributes
| Attribute | Type | Description |
|---|---|---|
quoteId | string | Unique quote identifier |
clientQuoteId | string | Your custom identifier (optional) |
asset | string | Asset symbol |
bidPrice | number | Bid (buy) price |
askPrice | number | Ask (sell) price |
bidSize | number | Bid quantity |
askSize | number | Ask quantity |
bidFilled | number | Quantity filled on bid side |
askFilled | number | Quantity filled on ask side |
status | string | Quote status |
validForSeconds | number | Quote validity duration |
expiresAt | string | Expiration timestamp |
metadata | object | Custom metadata |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |
Quote Statuses
| Status | Description |
|---|---|
active | Quote is live and can be filled |
partially_filled | Quote is partially filled on one or both sides |
filled | Quote is completely filled |
cancelled | Quote was cancelled |
expired | Quote expired |
Submit Quote
Submit a new two-sided quote.
POST /api/sdk/quotes
Required Scope: MARKET_MAKING
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
asset | string | Yes | Asset symbol (e.g., BTC) |
bidPrice | number | Yes | Bid (buy) price |
askPrice | number | Yes | Ask (sell) price |
bidSize | number | Yes | Bid quantity |
askSize | number | Yes | Ask quantity |
validForSeconds | number | No | Validity duration (1-300, default 30) |
clientQuoteId | string | No | Your custom ID (max 64 chars) |
metadata | object | No | Custom key-value pairs |
Example Request
curl -X POST https://api.zenotc.com/api/sdk/quotes \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature" \
-d '{
"asset": "BTC",
"bidPrice": 49900.00,
"askPrice": 50100.00,
"bidSize": 5.0,
"askSize": 5.0,
"validForSeconds": 30,
"clientQuoteId": "my-quote-001"
}'
quote = api_request("POST", "/api/sdk/quotes", {
"asset": "BTC",
"bidPrice": 49900.00,
"askPrice": 50100.00,
"bidSize": 5.0,
"askSize": 5.0,
"validForSeconds": 30,
"clientQuoteId": "my-quote-001"
})
Response
{
"quoteId": "quote_abc123def456",
"clientQuoteId": "my-quote-001",
"asset": "BTC",
"bidPrice": 49900.00,
"askPrice": 50100.00,
"bidSize": 5.0,
"askSize": 5.0,
"bidFilled": 0,
"askFilled": 0,
"status": "active",
"validForSeconds": 30,
"expiresAt": "2024-01-15T10:30:30.000Z",
"createdAt": "2024-01-15T10:30:00.000Z"
}
Errors
| Code | Description |
|---|---|
| 400 | Invalid parameters (bid >= ask, negative values, etc.) |
| 403 | Insufficient scope (requires MARKET_MAKING) |
| 422 | Risk check failed |
List Quotes
Retrieve a list of your quotes.
GET /api/sdk/quotes
Required Scope: READ
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter: active, expired, filled, cancelled |
asset | string | - | Filter by asset symbol |
limit | integer | 50 | Results per page (max 100) |
offset | integer | 0 | Pagination offset |
Example Request
curl -X GET "https://api.zenotc.com/api/sdk/quotes?status=active&asset=BTC" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
quotes = api_request("GET", "/api/sdk/quotes?status=active&asset=BTC")
Response
{
"quotes": [
{
"quoteId": "quote_abc123def456",
"asset": "BTC",
"bidPrice": 49900.00,
"askPrice": 50100.00,
"bidSize": 5.0,
"askSize": 5.0,
"status": "active",
"expiresAt": "2024-01-15T10:30:30.000Z",
"createdAt": "2024-01-15T10:30:00.000Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}
Get Quote
Retrieve a specific quote by ID.
GET /api/sdk/quotes/:quoteId
Required Scope: READ
Path Parameters
| Parameter | Type | Description |
|---|---|---|
quoteId | string | The quote ID |
Example Request
curl -X GET https://api.zenotc.com/api/sdk/quotes/quote_abc123def456 \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
Response
Returns the Quote object.
Update Quote
Update an active quote's prices or sizes.
PATCH /api/sdk/quotes/:quoteId
Required Scope: MARKET_MAKING
Path Parameters
| Parameter | Type | Description |
|---|---|---|
quoteId | string | The quote ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
bidPrice | number | No | New bid price |
askPrice | number | No | New ask price |
bidSize | number | No | New bid size |
askSize | number | No | New ask size |
validForSeconds | number | No | Extend validity |
At least one parameter must be provided.
Example Request
curl -X PATCH https://api.zenotc.com/api/sdk/quotes/quote_abc123def456 \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature" \
-d '{
"bidPrice": 49950.00,
"askPrice": 50050.00,
"validForSeconds": 30
}'
quote = api_request("PATCH", "/api/sdk/quotes/quote_abc123def456", {
"bidPrice": 49950.00,
"askPrice": 50050.00,
"validForSeconds": 30
})
Response
Returns the updated Quote object.
Cancel Quote
Cancel a specific quote.
DELETE /api/sdk/quotes/:quoteId
Required Scope: MARKET_MAKING
Path Parameters
| Parameter | Type | Description |
|---|---|---|
quoteId | string | The quote ID |
Example Request
curl -X DELETE https://api.zenotc.com/api/sdk/quotes/quote_abc123def456 \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
Response
{
"quoteId": "quote_abc123def456",
"status": "cancelled",
"cancelledAt": "2024-01-15T10:35:00.000Z"
}
Cancel All Quotes
Cancel all active quotes, optionally filtered by asset.
DELETE /api/sdk/quotes
Required Scope: MARKET_MAKING
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
asset | string | No | Cancel only quotes for this asset |
Example Request
curl -X DELETE https://api.zenotc.com/api/sdk/quotes \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature" \
-d '{"asset": "BTC"}'
# Cancel all BTC quotes
result = api_request("DELETE", "/api/sdk/quotes", {"asset": "BTC"})
# Cancel all quotes
result = api_request("DELETE", "/api/sdk/quotes", {})
Response
{
"cancelledCount": 3,
"cancelledQuotes": [
"quote_001",
"quote_002",
"quote_003"
]
}
Bulk Update Quotes
Update multiple quotes in a single request.
PATCH /api/sdk/quotes/batch/update
Required Scope: MARKET_MAKING
Request Body
Array of quote updates:
| Parameter | Type | Required | Description |
|---|---|---|---|
quoteId | string | Yes | The quote ID to update |
bidPrice | number | No | New bid price |
askPrice | number | No | New ask price |
bidSize | number | No | New bid size |
askSize | number | No | New ask size |
Example Request
curl -X PATCH https://api.zenotc.com/api/sdk/quotes/batch/update \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature" \
-d '[
{"quoteId": "quote_001", "bidPrice": 49950, "askPrice": 50050},
{"quoteId": "quote_002", "bidSize": 10, "askSize": 10}
]'
result = api_request("PATCH", "/api/sdk/quotes/batch/update", [
{"quoteId": "quote_001", "bidPrice": 49950, "askPrice": 50050},
{"quoteId": "quote_002", "bidSize": 10, "askSize": 10}
])
Response
{
"results": [
{"success": true, "quoteId": "quote_001"},
{"success": true, "quoteId": "quote_002"}
],
"summary": {
"total": 2,
"successful": 2,
"failed": 0
}
}