Skip to main content
POST
https://apis.hopnow.io
/
v1
/
accounts
/
{account_id}
/
fx
/
quotes
Create FX Quote
curl --request POST \
  --url https://apis.hopnow.io/v1/accounts/{account_id}/fx/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_currency": "<string>",
  "to_currency": "<string>",
  "amount": "<string>"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "account_id": "<string>",
  "base_currency": "<string>",
  "quote_currency": "<string>",
  "side": "<string>",
  "base_amount": "<string>",
  "quote_amount": "<string>",
  "all_in_rate": "<string>",
  "spread_bps": 123,
  "inside_rate": "<string>",
  "expires_at": "<string>",
  "executed_at": "<string>",
  "created": "<string>",
  "updated": "<string>"
}

Path Parameters

account_id
string
required
The account’s external ID (starts with acc_)

Request Body

from_currency
string
required
Currency to convert FROM (ISO 4217 code, 3 characters)
to_currency
string
required
Currency to convert TO (ISO 4217 code, 3 characters)
amount
string
required
Amount to convert in from_currency (decimal, must be positive)

Response

id
string
FX quote identifier (starts with quote_)
object
string
Always returns "fx_quote"
account_id
string
Account ID
base_currency
string
Base currency
quote_currency
string
Quote currency
side
string
Quote side: BUY or SELL
base_amount
string
Base currency amount (decimal)
quote_amount
string
Quote currency amount (decimal)
all_in_rate
string
All-in exchange rate including spread (decimal)
spread_bps
integer
Spread in basis points
inside_rate
string
Inside market rate (decimal)
expires_at
string
ISO 8601 timestamp when quote expires
executed_at
string
ISO 8601 timestamp when quote was executed
created
string
ISO 8601 timestamp when created
updated
string
ISO 8601 timestamp when last updated

Response Example

{
  "id": "quote_1234567890abcdef",
  "object": "fx_quote",
  "account_id": "acc_1234567890abcdef",
  "base_currency": "USD",
  "quote_currency": "EUR",
  "side": "BUY",
  "base_amount": "1000.00",
  "quote_amount": "850.00",
  "all_in_rate": "0.8500",
  "spread_bps": 50,
  "inside_rate": "0.8495",
  "expires_at": "2024-01-15T10:05:00Z",
  "executed_at": null,
  "created": "2024-01-15T10:00:00Z",
  "updated": "2024-01-15T10:00:00Z"
}