Skip to main content
POST
/
conversions
/
quote
Get a Quote
curl --request POST \
  --url https://access.utgl.io/v1/conversions/quote \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 123,
  "side": "buy",
  "accountId": "6a3176fe-7715-4fe0-a548-034912d7f800",
  "pair": "USDC/HKD",
  "idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW",
  "xid": "<string>",
  "xmetadata": {
    "key1": "value1",
    "key2": [
      "value2.1",
      "value2.2"
    ]
  }
}
'
{
  "quoteId": "<string>",
  "baseCurrency": "<string>",
  "baseAmount": 123,
  "quoteCurrency": "<string>",
  "quoteAmount": 123,
  "rate": 123,
  "expiresAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
amount
number
required

Amount of asset to trading

side
enum<string>
required

Side of trade, buying, or selling the base currency

Available options:
buy,
sell
accountId
string<uuid>
required

Account ID

Example:

"6a3176fe-7715-4fe0-a548-034912d7f800"

pair
string

Symbol of the pair to trade

Example:

"USDC/HKD"

idempotencyKey
string<string>

Unique idempotency key for ensuring exactly-once execution of mutating requests.

Example:

"xeev1she5eegh9daiviethahchoo1muW"

xid
string

External identifier, unique across all resources created under this account.

xmetadata
object

External metadata

Example:
{
"key1": "value1",
"key2": ["value2.1", "value2.2"]
}

Response

200 - application/json

OK

quoteId
string

Quote ID

baseCurrency
string

Base currency

baseAmount
number

Amount of base currency

quoteCurrency
string

Quote currency

quoteAmount
number

Amount of quote currency

rate
number

Rate of conversion

expiresAt
string<date-time>

Expiration time of the quote