Hercle
REST
POST/api/v1/rfq/accept

Accept RFQ

Accept a Request for Quote and execute the trade at the quoted price.

Auth:Bearer <api_key>
Tags:RFQIdempotent

Request

cURL
curl -X POST https://publicapi.sandbox.hercle.financial/api/v1/rfq/accept \
  -H "Authorization: Bearer eyJhb..." \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesContent type of the request body
Client-IdstringNoUnique idempotency key for the request. If a request with the same Client-Id is received within 6 hours, the original response is returned.

Request Body

Schema

object
requestForQuoteId*:string
// The ID of the RFQ to accept

Example

{
  "requestForQuoteId": "123e4567-e89b-12d3-a456-426614174000"
}

Response

Success Response Schema

FieldTypeDescription
tradeIdstringUnique identifier for the executed trade
sidestring
Order side
Allowed values:
buy
sell
pairstringTrading pair (e.g., BTCUSDT)
pricenumberExecution price
sizenumberTrade size in base currency
notionalnumberTotal value in quote currency
statusnumber
Current status of the order
0→ Created
1→ Executed
2→ Cancelled
3→ Pending
baseCurrencystringBase currency of the pair
quoteCurrencystringQuote currency of the pair
timestampstringISO 8601 timestamp of execution
statusErrorstringError message if order failed

Responses

RFQ accepted and order placed successfully

200 application/json
{
  "tradeId": "789e0123-e45b-67d8-a901-234567890abc",
  "side": "buy",
  "pair": "BTCUSDT",
  "price": 50000,
  "size": 0.5,
  "notional": 25000,
  "status": 1,
  "baseCurrency": "BTC",
  "quoteCurrency": "USDT",
  "timestamp": "2023-10-01T12:34:56.789Z",
  "statusError": ""
}

API Tester

Test this endpoint directly against the sandbox environment

Get your API key from Hercle Sandbox

https://publicapi.sandbox.hercle.financial/api/v1/rfq/accept