Skip to main content
POST
/
conversions
/
execute
Execute a trade
curl --request POST \
  --url https://access.utgl.io/v1/conversions/execute \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "quoteId": "<string>",
  "idempotencyKey": "xeev1she5eegh9daiviethahchoo1muW",
  "xid": "<string>",
  "xmetadata": {
    "key1": "value1",
    "key2": [
      "value2.1",
      "value2.2"
    ]
  }
}
'
{
  "success": true,
  "id": "a3310a45-44f3-4be0-a8ed-26f4a7d4c03e",
  "refId": "EX9KNFLEP4",
  "baseCurrency": "USD",
  "baseAmount": 100,
  "quoteCurrency": "HKD",
  "quoteAmount": 758.7169202399999,
  "rate": 7.5871692,
  "executedAt": "2023-03-01T12:05:07.000Z"
}

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
quoteId
string
required

Quote ID

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

OK

success
boolean

Trade execution status

Example:

true

id
string<uuid>

Trade id

Example:

"a3310a45-44f3-4be0-a8ed-26f4a7d4c03e"

refId
string

Trade transaction reference

Example:

"EX9KNFLEP4"

baseCurrency
string

Base currency

Example:

"USD"

baseAmount
number

Amount of base currency

Example:

100

quoteCurrency
string

Quote currency

Example:

"HKD"

quoteAmount
number

Amount of quote currency

Example:

758.7169202399999

rate
number

Rate of conversion

Example:

7.5871692

executedAt
string<date-time>

Execute time of the trade

Example:

"2023-03-01T12:05:07.000Z"