Ledger

This section give's control over the system's ledger.
Ledger routes should get it's data from an external ledger service.
The ledger is the system's source of truth,every action(trade,transfer,deposit,withdrawal,balance update) must be registered in the ledger - for verification, and data storage.
Admin logged in - can see the ledger status and information for all the system's users.
User logged in - can see it's own ledger data.

get-all-ledger-list

returns all the rows from the ledger talbe

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/ledger
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": [
    ]
}

get-ledger-for-exact-order

Return ledger info about order using order_id

SecurityAuthorization
Request
path Parameters
order_id
required
string

order_id path parameter

Example: <order_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/ledger/order/{order_id}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": [
    ]
}

get-ledger-list-for-exact-user

Getting list of ledger rows using user_id

SecurityAuthorization
Request
path Parameters
username
required
string

username path parameter

Example: <username>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/ledger/{username}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": [
    ]
}

get-pending-deposits-list-fro-exact-user

Getting pending deposits for specific user

SecurityAuthorization
Request
path Parameters
username
required
string

username path parameter

Example: <username>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/ledger/users/{username}/deposits
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}