POST
/
addOrder
curl --request POST \
  --url https://gateway.finhub.cloud/crypto/addOrder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'tenantId: <tenantid>' \
  --data '{
  "pair": "XXBTZUSD",
  "type": "buy",
  "ordertype": "limit",
  "price": "45000.1",
  "volume": "2.1234",
  "leverage": "2:1"
}'
{
  "error": [],
  "result": {
    "descr": {
      "order": "buy 2.12340000 XBTUSD @ limit 45000.1 with 2:1 leverage",
      "close": "close position @ stop loss 38000.0 -> limit 36000.0"
    },
    "txid": [
      "OUF4EM-FRGI2-MQMWZD"
    ]
  }
}

Authorizations

Authorization
string
headerrequired

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

tenantId
string
required

Tenant/Owner id

Content-Type
string

Body

application/json ยท object

The body is of type object.

Response

200 - application/json

The response is of type object.