Orders

get

Retrieve a list of active orders.

Query parameters
accountAddressstringOptional

Account address

Pattern: r[0-9a-zA-Z]{24,34}
bondIdstring · uuidOptional

Unique UUID of an entity in scope of this gateway

Example: ae5c406b-1696-47a0-beca-dac17f51a66b
Responses
200

Successfully retrieved a list of items.

application/json
Responseall of
get
/orders
GET /orders HTTP/1.1
Host: 
Accept: */*
200

Successfully retrieved a list of items.

{
  "pagination": {
    "size": 10,
    "page": 1,
    "totalItems": 25,
    "totalPages": 3
  },
  "items": [
    {
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-01-01T00:00:00.000Z",
      "id": "bfd39fbe-6551-44cc-8172-d3fa6174caac",
      "account_address": "text",
      "buy_token_id": "aa877547-6e57-47ed-8fa6-1c5e42ea893d",
      "buy_amount": 1,
      "buy_remaining_amount": 1,
      "sell_token_id": "6c2d466e-db54-46a0-bee1-2f8caa97d9c3",
      "sell_amount": 2,
      "sell_remaining_amount": 2,
      "type": "buy",
      "status": "active",
      "ratio": 2,
      "expires_at": "2024-12-31T00:00:00.000Z"
    }
  ]
}
post

Create a new order. Example: buy/sell a bond with a currency type token.

Body
currencyIdstring · uuidRequired

Unique UUID of the currency in scope of this gateway

Example: 1bf4ccaf-06eb-4530-bd96-0362c420afd9
pricenumberRequired

Total price of the currency

Example: 2
bondIdstring · uuidRequired

Unique UUID of the bond in scope of this gateway

Example: d635d09b-146a-4585-94ad-f12474593b33
amountnumberRequired

Total amount of the bond

Example: 1
typestring · enumRequired

Order Type

Example: buyPossible values:
expirationstring · date-timeOptional

Expiration date

Example: 2024-12-31T00:00:00.000Z
accountAddressstringRequired

Account address

Pattern: r[0-9a-zA-Z]{24,34}
Responses
201

Successfully created an order.

application/json
post
/orders
POST /orders HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 199

{
  "currencyId": "1bf4ccaf-06eb-4530-bd96-0362c420afd9",
  "price": 2,
  "bondId": "d635d09b-146a-4585-94ad-f12474593b33",
  "amount": 1,
  "type": "buy",
  "expiration": "2024-12-31T00:00:00.000Z",
  "accountAddress": "text"
}
201

Successfully created an order.

{
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "id": "bfd39fbe-6551-44cc-8172-d3fa6174caac",
  "account_address": "text",
  "buy_token_id": "aa877547-6e57-47ed-8fa6-1c5e42ea893d",
  "buy_amount": 1,
  "buy_remaining_amount": 1,
  "sell_token_id": "6c2d466e-db54-46a0-bee1-2f8caa97d9c3",
  "sell_amount": 2,
  "sell_remaining_amount": 2,
  "type": "buy",
  "status": "active",
  "ratio": 2,
  "expires_at": "2024-12-31T00:00:00.000Z"
}
get

Retrieve full specific order information.

Path parameters
orderIdstring · uuidRequired

UUIDv4 unique id of an order

Example: c75ca34b-3af6-48ff-9652-d54a4ca9459e
Responses
200

Successfully received an order.

application/json
get
/orders/{orderId}
GET /orders/{orderId} HTTP/1.1
Host: 
Accept: */*
200

Successfully received an order.

{
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "id": "bfd39fbe-6551-44cc-8172-d3fa6174caac",
  "account_address": "text",
  "buy_token_id": "aa877547-6e57-47ed-8fa6-1c5e42ea893d",
  "buy_amount": 1,
  "buy_remaining_amount": 1,
  "sell_token_id": "6c2d466e-db54-46a0-bee1-2f8caa97d9c3",
  "sell_amount": 2,
  "sell_remaining_amount": 2,
  "type": "buy",
  "status": "active",
  "ratio": 2,
  "expires_at": "2024-12-31T00:00:00.000Z"
}
put

Update an existing order. Example: buy/sell a bond with a currency type token.

Path parameters
orderIdstring · uuidRequired

UUIDv4 unique id of an order

Example: c47b42b9-74e0-40c4-9b54-56e41a9c768f
Body
currencyIdstring · uuidRequired

Unique UUID of the currency in scope of this gateway

Example: 1bf4ccaf-06eb-4530-bd96-0362c420afd9
pricenumberRequired

Total price of the currency

Example: 2
bondIdstring · uuidRequired

Unique UUID of the bond in scope of this gateway

Example: d635d09b-146a-4585-94ad-f12474593b33
amountnumberRequired

Total amount of the bond

Example: 1
typestring · enumRequired

Order Type

Example: buyPossible values:
expirationstring · date-timeOptional

Expiration date

Example: 2024-12-31T00:00:00.000Z
Responses
201

Successfully updated an order.

application/json
put
/orders/{orderId}
PUT /orders/{orderId} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 175

{
  "currencyId": "1bf4ccaf-06eb-4530-bd96-0362c420afd9",
  "price": 2,
  "bondId": "d635d09b-146a-4585-94ad-f12474593b33",
  "amount": 1,
  "type": "buy",
  "expiration": "2024-12-31T00:00:00.000Z"
}
201

Successfully updated an order.

{
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "id": "bfd39fbe-6551-44cc-8172-d3fa6174caac",
  "account_address": "text",
  "buy_token_id": "aa877547-6e57-47ed-8fa6-1c5e42ea893d",
  "buy_amount": 1,
  "buy_remaining_amount": 1,
  "sell_token_id": "6c2d466e-db54-46a0-bee1-2f8caa97d9c3",
  "sell_amount": 2,
  "sell_remaining_amount": 2,
  "type": "buy",
  "status": "active",
  "ratio": 2,
  "expires_at": "2024-12-31T00:00:00.000Z"
}
patch

Cancel the order by id parameter.

Path parameters
orderIdstring · uuidRequired

UUIDv4 unique id of an order

Example: b418a760-f9d9-438b-aa72-c43c3282c010
Responses
200

The order was cancelled.

No content

patch
/orders/{orderId}
PATCH /orders/{orderId} HTTP/1.1
Host: 
Accept: */*
200

The order was cancelled.

No content