Liquidations

Download Spec

All accounts liquidations related paths.

List accounts liquidations

get /accounts/{account_id}/liquidations

List accounts liquidations

sort

string

Sort the result by id.

Default
"id"
Enum
  • id

order

string

Sort order of the result list if the sort parameter is specified. By default, only ASC for ascending sort.

Default
"ASC"
Enum
  • ASC

offset

int

i32

Use the offset argument to specify where in the list of results to start when returning items for a particular query.

Min
0

limit

int

i32

Use the limit argument to specify the maximum number of items returned.

Default
100
Min
0
Max
1000

start_date

string

Returns accounts liquidations created starting from and including this date (UTC)

Example
"2022-10-14T00:00:00Z"

end_date

string

Returns accounts liquidations created up until this date (UTC)

Example
"2022-10-14T00:00:00Z"

Response

ExamplesSchema

Accounts liquidations

{
  "meta": {
    "offset": 0,
    "limit": 100,
    "count": 1,
    "total_count": 1,
    "sort": "id",
    "order": "ASC"
  },
  "data": [
    {
      "id": "c5869b0c-e107-4e68-a89a-57ad43253dd6",
      "created_at": "2021-07-21T14:10:00.000Z",
      "updated_at": "2021-07-21T14:10:00.000Z",
      "account_id": "debf2026-f2da-4ff0-bb84-92e45babb1e3",
      "cash_amount": "1000",
      "currency": "EUR",
      "status": "PROCESSING",
      "orders": [
        {
          "id": "b291d8a4-21f5-4c52-8590-4f90ce54d0b1",
          "side": "SELL",
          "status": "NEW"
        },
        {
          "id": "81d02bd9-7b9d-443d-bbfa-31df4d543f7d",
          "side": "SELL",
          "status": "PROCESSING"
        },
        {
          "id": "e97fb564-ebb4-4f37-930a-bda49c09a2e4",
          "side": "SELL",
          "status": "FILLED"
        }
      ]
    }
  ]
}

Create account liquidation request

post /accounts/{account_id}/liquidations

Create account liquidation request

user_id

string

uuid

required

User unique identifier.

Request

{
  "user_id": "084a00a8-4a37-4d2d-b276-71ec5e2be0e3"
}

Response

ExamplesSchema

Account liquidation object

{
  "id": "b2f541dc-a27b-4d5a-b970-41812b0892b9",
  "created_at": "2021-07-21T14:10:00.000Z",
  "updated_at": "2021-07-21T14:10:00.000Z",
  "account_id": "debf2026-f2da-4ff0-bb84-92e45babb1e3",
  "user_id": "81dfb00e-9be6-4617-8994-dfd0407f34df",
  "cash_amount": "1000",
  "currency": "EUR",
  "status": "NEW",
  "orders": []
}

Retrieve account liquidation

get /accounts/{account_id}/liquidations/{account_liquidation_id}

Retrieve account liquidation

account_id

string

uuid

required

Account unique identifier.

account_liquidation_id

string

uuid

required

Response

ExamplesSchema

Account liquidation object

{
  "id": "f386fdc4-dcd8-4dce-8acb-dae332f51483",
  "created_at": "2021-07-21T14:10:00.00Z",
  "updated_at": "2021-07-21T14:10:00.00Z",
  "user_id": "4b9732bd-7496-4e91-8a5f-6360479d7fed",
  "account_id": "f2f7d2c7-d79b-4de2-ae9b-d01646259f9e",
  "cash_amount": "100.00",
  "currency": "EUR",
  "status": "PROCESSING",
  "orders": [
    {
      "id": "79f2c816-13ed-4588-85e6-f3398b0b5825",
      "side": "SELL",
      "status": "NEW"
    },
    {
      "id": "44f50a4e-7ce8-4eae-a078-f4b3d8ab4708",
      "side": "SELL",
      "status": "NEW"
    }
  ]
}

Cancel account liquidation

delete /accounts/{account_id}/liquidations/{account_liquidation_id}

Cancel account liquidation

account_id

string

uuid

required

Account unique identifier.

account_liquidation_id

string

uuid

required

Response

ExamplesSchema

Request has been processed successfully.

Empty response

Account liquidation events

webhook

Account liquidation events

id

string

uuid

required

Event unique identifier

created_at

string

date-time

required

Date and time when the event was created. RFC 3339-5, ISO8601 UTC

type

string

required

Event type

Enum
  • ACCOUNT_LIQUIDATION.NEW
  • ACCOUNT_LIQUIDATION.PROCESSING
  • ACCOUNT_LIQUIDATION.FILLED
  • ACCOUNT_LIQUIDATION.CANCELLED
  • ACCOUNT_LIQUIDATION.SETTLED

object

object (object)

required

webhook_id

string

uuid

required

Webhook unique identifier.

Request

{
  "id": "56510309-d9de-4730-9b5b-4a0ed047f3a9",
  "created_at": "2021-07-21T14:10:00.00Z",
  "type": "ACCOUNT_LIQUIDATION.NEW",
  "object": {
    "id": "b2f541dc-a27b-4d5a-b970-41812b0892b9",
    "created_at": "2021-07-21T14:10:00.000Z",
    "updated_at": "2021-07-21T14:10:00.000Z",
    "account_id": "debf2026-f2da-4ff0-bb84-92e45babb1e3",
    "user_id": "81dfb00e-9be6-4617-8994-dfd0407f34df",
    "cash_amount": "1000",
    "currency": "EUR",
    "status": "NEW",
    "orders": []
  },
  "webhook_id": "b838bde5-b6df-4f1f-bfc4-71d3fb01d430"
}

Response

ExamplesSchema

Request has been processed successfully.

Empty response

Was this page helpful?