Hercle
REST
POST/api/v1/rfq

Create RFQ

Create a Request for Quote (RFQ) to get a price quote for a trading pair. Has to be accepted within the time limit through Accept RFQ endpoint.

Auth:Bearer <api_key>
Tags:RFQ

Request

cURL
curl -X POST https://publicapi.sandbox.hercle.financial/api/v1/rfq \
  -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

Request Body

Schema

object
pair*:string
// Trading pair (e.g., BTCUSDT)
side*:string(buy | sell)
// Order side - buy or sell
size*:number
// Size (base currency) - 0 to skip
amount*:number
// Amount (quote currency) - 0 to skip

Example

{
  "pair": "BTCUSDT",
  "side": "buy",
  "size": 0.5,
  "amount": 25000
}

Response

Success Response Schema

FieldTypeDescription
requestForQuoteIdstringUnique identifier for the RFQ
userIdstringUser identifier who created the RFQ
instrumentstringTrading instrument (e.g., BTCUSDT)
baseCurrencystringBase currency of the pair
quoteCurrencystringQuote currency of the pair
pricenumberQuoted price for the trade
sizenumberTrade size in base currency
sidestring
Order side
Allowed values:
buy
sell
amountnumberTrade amount in quote currency
statusnumber
Current status of the RFQ
0Created
1Executed
2Cancelled
3Pending
expireDateTimestringISO 8601 timestamp when the RFQ expires
requestDateTimestringISO 8601 timestamp when the RFQ was created

Responses

RFQ created successfully

201 application/json
{
  "requestForQuoteId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "987e6543-e21b-12d3-a456-426614174000",
  "instrument": "BTCUSDT",
  "baseCurrency": "BTC",
  "quoteCurrency": "USDT",
  "price": 50000,
  "size": 0.5,
  "side": "buy",
  "amount": 25000,
  "status": 0,
  "expireDateTime": "2024-06-01T12:30:00Z",
  "requestDateTime": "2024-06-01T12:00:00Z"
}

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