All accounts related paths

Get user accounts

get /users/{user_id}/accounts

Lists the accounts of a user specified by ID.

sort

string

Sort the result by created_at, updated_at.

Default
"created_at"
Enum
  • created_at
  • updated_at

order

string

Sort order of the result list if the sort parameter is specified. Use ASC for ascending or DESC for descending sort order.

Default
"ASC"
Enum
  • ASC
  • DESC

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

Response

ExamplesSchema

OK

{
  "meta": {
    "offset": 0,
    "limit": 100,
    "count": 1,
    "total_count": 1,
    "sort": "id",
    "order": "ASC"
  },
  "data": [
    {
      "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
      "created_at": "2020-08-24T14:15:22Z",
      "updated_at": "2020-08-24T14:15:22Z",
      "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
      "type": "TRADING",
      "users": [
        {
          "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
          "type": "OWNER"
        }
      ],
      "account_number": 1,
      "name": "Main account",
      "status": "ACTIVE"
    }
  ]
}

Get account by ID

get /accounts/{account_id}

Returns the account specified by its ID.

account_id

string

uuid

required

Account unique identifier.

Response

ExamplesSchema

OK

{
  "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
  "created_at": "2020-08-24T14:15:22Z",
  "updated_at": "2020-08-24T14:15:22Z",
  "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
  "type": "TRADING",
  "users": [
    {
      "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
      "type": "OWNER"
    }
  ],
  "account_number": 1,
  "name": "Main account",
  "status": "ACTIVE"
}

Close account by ID

delete /accounts/{account_id}

Initiates the closure request for an account specified by its ID.

account_id

string

uuid

required

Account unique identifier.

Response

ExamplesSchema

The request has been successfully accepted and will be processed asynchronously.

Empty response

Update account by ID

patch /accounts/{account_id}

Updates the account specified by its ID.

name

string

The name of the account.

Max Length
100

Request

{
  "name": "Main account"
}

Response

ExamplesSchema

Account updated.

{
  "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
  "created_at": "2020-08-24T14:15:22Z",
  "updated_at": "2020-08-24T14:15:22Z",
  "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
  "type": "TRADING",
  "users": [
    {
      "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
      "type": "OWNER"
    }
  ],
  "account_number": 1,
  "name": "Main account",
  "status": "ACTIVE"
}

Get accounts

get /accounts

Returns a list of all accounts.

sort

string

Sort the result by created_at, updated_at§.

Default
"created_at"
Enum
  • created_at
  • updated_at

order

string

Sort order of the result list if the sort parameter is specified. Use ASC for ascending or DESC for descending sort order.

Default
"ASC"
Enum
  • ASC
  • DESC

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

Response

ExamplesSchema

OK

{
  "meta": {
    "offset": 0,
    "limit": 100,
    "count": 1,
    "total_count": 1,
    "sort": "created_at",
    "order": "ASC"
  },
  "data": [
    {
      "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
      "created_at": "2020-08-24T14:15:22Z",
      "updated_at": "2020-08-24T14:15:22Z",
      "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
      "type": "TRADING",
      "users": [
        {
          "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
          "type": "OWNER"
        }
      ],
      "account_number": 1,
      "name": "Main account",
      "status": "ACTIVE"
    }
  ]
}

Create an account

post /accounts

Creates an account.

user_id

string

uuid

required

User unique identifier.

account_group_id

string

uuid

required

Account group unique identifier.

type

string

required

Account type.

  • TRADING - Orders in accounts of this type are created on a specific instrument basis.
  • PORTFOLIO - Orders in accounts of this type are created on a portfolio basis and additional portfolio functionality is available.
Enum
  • TRADING
  • PORTFOLIO

name

string

The name of the account.

Max Length
100

Request

{
  "user_id": "413715f2-5401-4b97-8055-034a6b879f8c",
  "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
  "type": "TRADING",
  "name": "Main account"
}

Response

ExamplesSchema

Account created.

{
  "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
  "created_at": "2020-08-24T14:15:22Z",
  "updated_at": "2020-08-24T14:15:22Z",
  "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
  "type": "TRADING",
  "users": [
    {
      "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
      "type": "OWNER"
    }
  ],
  "account_number": 1,
  "name": "Main account",
  "status": "ACTIVE"
}

Account events

webhook

Account 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.CREATED
  • ACCOUNT.ACTIVATED
  • ACCOUNT.CLOSING_INITIATED
  • ACCOUNT.CLOSED
  • ACCOUNT.LOCKED
  • ACCOUNT.UPDATED

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.CREATED",
  "object": {
    "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd",
    "created_at": "2020-08-24T14:15:22Z",
    "updated_at": "2020-08-24T14:15:22Z",
    "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6",
    "type": "TRADING",
    "users": [
      {
        "id": "9c36af78-91a0-4174-a515-fc81214e3dab",
        "type": "OWNER"
      }
    ],
    "account_number": 1,
    "name": "Main account",
    "status": "ACTIVE"
  },
  "webhook_id": "b838bde5-b6df-4f1f-bfc4-71d3fb01d430"
}

Response

ExamplesSchema

Request has been processed successfully.

Empty response

Was this page helpful?