Komainu API (1.4.0)

Download OpenAPI specification:

Introduction

The Komainu API is a RESTful API that you can integrate with your system.

Get in touch with your Account Manager to access the Komainu API.

Getting started

You can download our Postman API Collection here (collection, environment)

Note: The postman collection includes a sample script to generate a message signature using unencrypted private key. If you encrypt the private key, you will need to either update the script accordingly or use unencrypted private key.

Authentication

All of our API endpoints require authentication. First, you need to generate a Private Key / Public Key pair.

  • Elliptic curve
    • SECP256R1
  • Private key encoding
    • encoding PEM
  • Private key format
    • PKCS8
  • Public key encoding
    • Base64

You can do this by using the following command:

from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import ec

import base64

def generate_keys(passphrase: str):
    if not passphrase:
        raise ValueError("Passphrase is required for key generation")
    private_key = ec.generate_private_key(ec.SECP256R1(), default_backend())

    private_key_bytes = private_key.private_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PrivateFormat.PKCS8,
        encryption_algorithm=serialization.BestAvailableEncryption(passphrase.encode("utf-8")),
    )

    print("\n *** Private Key (encrypted) *** \n")

    private_key_pem = private_key_bytes.decode("utf-8")
    print(f"\nIn PKCS8 (PEM):\n{private_key_pem}")

    private_key_base64 = base64.b64encode(private_key_bytes).decode("utf-8")
    print(f"\nIn PKCS8 (Base64):\n{private_key_base64}")

    private_key_hex = private_key_bytes.hex()
    print(f"\nIn PKCS8 (Hex):\n{private_key_hex}")
    
    print("\n\n *** Private Key (unencrypted) *** \n")

    # Load the encrypted private key and decrypt it
    loaded_private_key = serialization.load_pem_private_key(
        private_key_bytes,
        password=passphrase.encode("utf-8"),
        backend=default_backend()
    )
    
    # Get the unencrypted version
    unencrypted_private_key_bytes = loaded_private_key.private_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PrivateFormat.PKCS8,
        encryption_algorithm=serialization.NoEncryption(),
    )
    unencrypted_private_key_pem = unencrypted_private_key_bytes.decode("utf-8")
    print(f"\nIn PKCS8 (PEM):\n{unencrypted_private_key_pem}")
    
    unencrypted_private_key_base64 = base64.b64encode(unencrypted_private_key_bytes).decode("utf-8")
    print(f"\nIn PKCS8 (Base64):\n{unencrypted_private_key_base64}")
    
    unencrypted_private_key_hex = unencrypted_private_key_bytes.hex()
    print(f"\nIn PKCS8 (Hex):\n{unencrypted_private_key_hex}")

    print("\n\n *** Public Key *** \n")

    public_key = private_key.public_key()
    public_key_bytes = public_key.public_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PublicFormat.SubjectPublicKeyInfo,
    )
    public_key_pem = public_key_bytes.decode("utf-8")
    print(f"\nIn PEM:\n{public_key_pem}")

    public_key_base64 = base64.b64encode(public_key_bytes).decode("utf-8")
    print(f"\nIn Base64:\n{public_key_base64}")

    public_key_hex = public_key_bytes.hex()
    print(f"\nIn Hex:\n{public_key_hex}")

    print("\n\n *** For API User Registration, please use the following public key *** \n")
    print(f"\nIn Base64:\n{public_key_base64}")


# Get passphrase from user
def get_passphrase():
    passphrase = input("Enter passphrase: ")
    return passphrase

passphrase = get_passphrase()
generate_keys(passphrase)

The private key is used to sign the request. Then, you need to submit your public key via Komainu Portal while registering your API User (or email to an account manager). Once your API User is fully approved, you can generate a secret from the same screen.

  1. Retrieve an access token by sending a POST request to the /v1/auth/token endpoint with your username and password in the payload.
curl --request POST https://api.komainu.io/v1/auth/token \
  --header 'content-type: application/json' \
  --data '{"api_user": "***","api_secret": "***"}'

The response will contain an access_token, which you will use in all subsequent requests.

{
  "access_token": "ey***.***.***",
  "expires_in": 600,
  "token_type": "Bearer"
}
  1. Sign your request by adding the following headers:
  • Authorization: bearer token from the previous step
  • X-Timestamp: the current timestamp in milliseconds
  • X-Signature: the signature of the request

The signature is a base64 encoded string of the ES256 signature of the following string:

canonical_string = <host>,<method>,<path>,<base64(sha256(body))>,<base64(sha256(token))>,<timestamp>

where:

  • <host> is the host of the API (api.komainu.io or api-demo.komainu.io)
  • <method> is the HTTP method of the request in lower case (get, post, put, patch, delete)
  • <path> is the path of the request with the query string (e.g. /transactions/1?wallet_id=3)
  • <base64(sha256(body))> is 'sha256=' followed by the base64 encoded sha256 hash of the request body (if the request has no body, use an empty string)
  • <base64(sha256(token))> is 'sha256=' followed by the base64 encoded sha256 hash of the bearer token
  • <timestamp> is the value of the X-Timestamp header, milliseconds in unix time

Then, sign the canonical string with your private key and encode the hex-encoded hash in base64. Make sure to use the unencrypted private key. i.e. base64(hmac_es256(canonical_string))

The completed input for the x-signature should look similar to:

api.komainu.io,post,/v1/custody/transactions,sha256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=,sha256=In7qwVHNt4SeKwD8qSzJCTlmmabBcKWREgMQ3APEXDo=,1699870783112

and the X-Signature (output) should look like:

w9vsJx+bezboTilm6h2qXEng9UClkU/ntP/8o/SjRzEirbnUO7RRBEUN7ilLDAl69ZwevzJTOaUI0ws8Rh+F4UH26Ipq+QRhQgIgxHNNIek1y6zbMyrladM9+tgtz73HOhbuXBrdi7BGOBLv4bv9kSsSukA8C2ZVxqYxEV8LyfiVGsY06wSRaUgwGk3bBu7FuUK2fdwyQbZqam9ArJa+98tmOgJBY4/Md551bgN7gjDuBLxHplUKiFXx9XbhqC6pwVtiSU0UwvembDIGutxa5PMXowuF6WddJWMEddIY8B7rB0OyNnev4t2hbCQEz5tyk0idDV7IRiIcDNi7Ng39eQ==

This should be sent in the X-Signature header along with X-Timestamp header.

Idempotency

The API supports idempotency for POST requests. To use this feature, include the X-Idempotency-Key header in your request. The value of this header should be a unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the original request.

Rate limitations

The following rate limits are applied to the API User by default. Please contact your Account Manager if you need to increase the rate limits.

  • 300 requests per 5 minutes for all endpoints regardless of the response
  • 5 requests per 20 seconds for each of post endpoints
  • Unusually high number of requests on Authentication endpoint may be blocked by brute force protection
  • High number of concurrent open requests may be dropped

Transaction Initiation

1. Create a request

To initiate a transaction, you need to create a request with the type CREATE_TRANSACTION to this endpoint:

  • POST /v1/custody/requests endpoint.

Generally, the transaction payload will be created after calling these endpoints:

  • GET /v1/custody/wallets to get the wallet_id
  • POST /v1/custody/transactions/estimate-fee to get the estimated fee

Note that the estimate fee endpoint requires the API User to have Initiate Transaction permission. Upon successful creation, the request will be in the status CREATED.

2. Wait and validate the request

Komainu will validate the submitted request. During this process,

  • GET /v1/custody/requests/{request_id} will return the status CREATED.
  • GET /v1/custody/requests/{request_id}/challenge will return 404 not found.

Once the request is successfully validated in the system,

  • GET /v1/custody/requests/{request_id} will return the status PENDING.
  • GET /v1/custody/requests/{request_id}/challenge will return a challenge, which is base64 encoded string of the request stored in the vault

You will then need to decode the challenge and validate it with the request data.

In case the request is invalid for some reason, the request will be in the status BLOCKED.

3. Confirm or cancel the request

If the challenge is valid, you can confirm or cancel the request. Use the API User's private key to sign the challenge and generate jws (jws consists of three parts, concatenated by period: the JWS Header, the JWS Payload, and the JWS Signature, where each part is base64url-encoded).

import jwt

def sign_challenge(challenge: bytes, private_key_hex: str) -> str:
  private_key_bytes = bytes.fromhex(private_key_hex)
  challenge_data_bytes = jwt.utils.base64url_decode(challenge)
  jws = jwt.PyJWS()
  jws: str = jws.encode(challenge_data_bytes, private_key_bytes, algorithm="ES256")
  return jws

To confirm the request, you need to sign the challenge with your private key and send it to

  • POST /v1/custody/requests/{request_id}/confirm
  • The request will be in the status PENDING_FOR_APPROVAL where approvers can approve the request.

To cancel the request, you need to sign the challenge with your private key and send it to

  • POST /v1/custody/requests/{request_id}/cancel
  • The request will be in the status CANCELLED. No further action can be taken to this request.

Transaction Approval

1. Get a request

To approve a request, you need to get the request by Id from this endpoint:

  • GET /v1/custody/requests/{request_id}

If this is the request for the API User to approve, get the challenge code by calling this endpoint:

  • GET /v1/custody/requests/{request_id}/challenge

This will return a challenge, which is base64 encoded string of the request stored in the vault. You will then need to decode the challenge and validate it with the request data. If you are not the approver, this endpoint will return 404 not found.

2. Approve or reject the request

If the challenge is valid, you can approve or reject the request. Use the API User's private key to sign the challenge and generate jws (jws consists of three parts, concatenated by period: the JWS Header, the JWS Payload, and the JWS Signature, where each part is base64url-encoded).

import jwt

def sign_challenge(challenge: bytes, private_key_hex: str) -> str:
  private_key_bytes = bytes.fromhex(private_key_hex)
  challenge_data_bytes = jwt.utils.base64url_decode(challenge)
  jws = jwt.PyJWS()
  jws: str = jws.encode(challenge_data_bytes, private_key_bytes, algorithm="ES256")
  return jws

To approve the request, you need to sign the challenge with your private key and send it to

  • POST /v1/custody/requests/{request_id}/approve

To reject the request, you need to sign the challenge with your private key and send it to

  • POST /v1/custody/requests/{request_id}/reject
  • The request will be in the status REJECTED. No further action can be taken to this request.

Expiry

A request that has not been completed within the expiry will be automatically discarded.

Notifications

You can receive notifcations from Komainu via webhook or email on transactions and requests events.

Webhook registration

Each API User can register a Webhook URL to receive notifications. It receives relevant events for the API User based on the permission. The webhook URL and secret are registered in Komainu Portal while registering the API User (or email to an account manager if you do not have access to the portal).

Webhook events

You will receive a POST call to the registered URL with the event data in the body.

{"event_type": "REQUEST_CREATED", "entity": "REQUEST", "entity_id": "dbe727e0-6a58-434d-9253-f085545dc7e9"}

The list of events are as follows in a table:

event_type entity description
REQUEST_CREATED REQUEST A new request has been created
REQUEST_TO_APPROVE REQUEST A request is pending for approval. Only sent to API User's endpoint who is eligible to approve the request
REQUEST_PARTIALLY_APPROVED REQUEST A request has been partially approved
REQUEST_FULLY_APPROVED REQUEST A request has been fully approved
REQUEST_REJECTED REQUEST A request has been rejected
REQUEST_EXPIRED REQUEST A request has expired
REQUEST_FAILED REQUEST A request has been failed
TRANSACTION_CREATED TRANSACTION A new outbound transaction has been created
TRANSACTION_RECEIVED TRANSACTION A new inbound transaction has been received
TRANSACTION_BROADCASTED TRANSACTION A transaction has been broadcasted to blockchain
TRANSACTION_CONFIRMED TRANSACTION A transaction has been confirmed on chain
TRANSACTION_FAILED TRANSACTION A transaction has been failed
SETTLEMENT_CREATED SETTLEMENT A new settlement has been created
SETTLEMENT_COMPLETED SETTLEMENT A settlement has been completed
SETTLEMENT_FAILED SETTLEMENT A settlement has been failed
COLLATERAL_OPERATION_CREATED COLLATERAL_OPERATION A new collateral operation has been created
COLLATERAL_OPERATION_COMPLETED COLLATERAL_OPERATION A collateral operation has been completed
COLLATERAL_OPERATION_FAILED COLLATERAL_OPERATION A collateral operation has been failed
BALANCE_UPDATED BALANCE A balance has been updated

Webhook validation

The webhook request is sent with the following headers:

  • X-Komainu-Signature: the signature of the request
  • X-Komainu-Timestamp: the timestamp of the request

The signature can be validated by the secret submitted in the webhook registration.

SECRET = "mysecret"
USER = "api_user"

@app.route("/", methods=["POST"])
def webhook():
    signature = request.headers["X-Komainu-Signature"]
    timestamp = request.headers["X-Komainu-Timestamp"]

    if time.time() - int(timestamp) > 5 * 60:
        raise ValueError("message is too old, possible replay attack")

    to_sign = timestamp.encode() + b"." + request.data
    computed_signature = hmac.new(SECRET.encode(), to_sign, "sha256").hexdigest()
    if not hmac.compare_digest(signature, computed_signature):
        raise ValueError("signature mismatch")

Eamil notifications

Komainu also supports email notifications for new transactions (inbound / outbound). Please contact your account manager for the details.

Change Log

Version 1.4

Release Date: 2025-07-18

New Features

  • Added balance webhook event

API Enhancements

  • Updated pagenation parameters for page and page_size

Version 1.3

Release Date: 2025-07-04

New Features

  • Added daily staking rewards reporting
  • Added transaction webhook events

Authentication

Request a token

This returns an access token to be used to access the other endpoints.

Request Body schema: application/json
required
api_user
string
api_secret
string

Responses

Request samples

Content type
application/json
{
  • "api_user": "YOUR_API_USER",
  • "api_secret": "API_USER_PASSWORD"
}

Response samples

Content type
application/hal+json
{
  • "access_token": "string",
  • "expires_in": 0,
  • "token_type": "string"
}

Requests

From this endpoint, you can call the following Requests API.

Search requests

This returns a list of requests.

Authorizations:
JWT
query Parameters
status
string
Enum: "CREATED" "PENDING" "APPROVED" "REJECTED" "CANCELLED" "EXPIRED" "BLOCKED"

Status

type
string
Enum: "CREATE_TRANSACTION" "COLLATERAL_OPERATION"
organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Create a request

This creates a request.

Authorizations:
JWT
Request Body schema: application/json
required
type
string
transactionRequest (object) or collateralRequest (object)
account
string
note
string

Responses

Request samples

Content type
application/json
Example
{
  • "type": "CREATE_TRANSACTION",
  • "data": {
    },
  • "account": "12345",
  • "note": "Transfer from custody to external wallet"
}

Response samples

Content type
application/json
Example
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "CREATED",
  • "entity": "TRANSACTION",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Get a request by Id

This returns a request by Id.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "PENDING",
  • "entity": "TRANSACTION",
  • "entity_id": "4e3592da-a54b-4518-a708-7834400f7e00",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Get a challenge for a request

This returns a challenge for a request.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "challenge": "abc"
}

Confirm a request

This confirms a request.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Request Body schema: application/json
required

A generated jws for the challenge

jws
string

Responses

Request samples

Content type
application/json
{
  • "jws": "string"
}

Response samples

Content type
application/json
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "CREATED",
  • "entity": "TRANSACTION",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Cancel a request

This cancels a request.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Request Body schema: application/json
required

A generated jws for the challenge

jws
string

Responses

Request samples

Content type
application/json
{
  • "jws": "string"
}

Response samples

Content type
application/json
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "CANCELLED",
  • "entity": "TRANSACTION",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Approve a request

This approves a pending request.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Request Body schema: application/json
required

A generated jws for the challenge

jws
string

Responses

Request samples

Content type
application/json
{
  • "jws": "string"
}

Response samples

Content type
application/json
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "APPROVED",
  • "entity": "TRANSACTION",
  • "entity_id": "4e3592da-a54b-4518-a708-7834400f7e00",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Reject a request

This rejects a pending request. Apart from approvers, an initiator can reject own request.

Authorizations:
JWT
path Parameters
request_id
required
string

Request Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Request Body schema: application/json
required

A generated jws for the challenge

jws
string

Responses

Request samples

Content type
application/json
{
  • "jws": "string"
}

Response samples

Content type
application/json
{
  • "id": "f4fe1fd6-d39b-4a69-8074-b30f0750ff01",
  • "type": "CREATE_TRANSACTION",
  • "status": "REJECTED",
  • "entity": "TRANSACTION",
  • "requested_by": "31617a78-64fd-48dd-9608-35dbd1e3e809",
  • "requested_at": "2024-01-01T00:00:00Z",
  • "expires_at": "2024-01-01T00:00:00Z",
  • "updated_at": "2024-01-01T00:00:00Z",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Wallets

From this endpoint, you can call the following Wallets API.

Search wallets

This returns a list of wallets.

Authorizations:
JWT
query Parameters
asset
string

Asset Code

status
string
Enum: "ACTIVE" "INACTIVE" "APPROVED" "HSM_COIN_UPDATED" "PENDING" "PENDING_CREATE_IN_HSM" "PENDING_VIEW_ONLY" "REJECTED" "VIEW_ONLY"

Status

wallet_category
string
Enum: "CUSTODY" "STAKING" "COLLATERAL"

Wallet category

organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

external_reference
string

External reference in the backend vault platform

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "name": "BTC12345_TEST",
  • "asset": "BTC",
  • "address": "bc1qfkzk0xxfj46m6ma0jlygerm3rvvat7wtx50jmd0s3dqrd3p42hfq9xh86d",
  • "balance": {
    },
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "external_reference": "104",
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "wallet_category": "CUSTODY",
  • "status": "ACTIVE"
}

Get a wallet by Id

This returns a wallet by Id.

Authorizations:
JWT
path Parameters
wallet_id
required
string

Wallet Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "name": "BTC12345_TEST",
  • "asset": "BTC",
  • "address": "bc1qfkzk0xxfj46m6ma0jlygerm3rvvat7wtx50jmd0s3dqrd3p42hfq9xh86d",
  • "balance": {
    },
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "external_reference": "104",
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "wallet_category": "CUSTODY",
  • "status": "ACTIVE"
}

Get wallet addresses

This returns all addresses associated with the wallet.

Authorizations:
JWT
path Parameters
wallet_id
required
string

Wallet Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

query Parameters
page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a wallet address by index

This returns a specific address by index for the wallet.

Authorizations:
JWT
path Parameters
wallet_id
required
string

Wallet Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

index
required
integer

Address index (e.g. 0, 1, 2)

Responses

Response samples

Content type
application/json
{
  • "index": 0,
  • "address": "bc1qfkzk0xxfj46m6ma0jlygerm3rvvat7wtx50jmd0s3dqrd3p42hfq9xh86d",
  • "derivation_path": "m/84'/0'/0'/0/0"
}

Retrieve end of day balances for a wallet

This returns end of day balances for the specified wallet.

Authorizations:
JWT
path Parameters
wallet_id
required
string

Wallet Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

query Parameters
date
string <date>

Up to 30 days prior to the current business date can be specified to limit the response for a day. If not specified, all EOD balances for the last 30 days are returned.

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "name": "BTC12345_TEST",
  • "asset": "BTC",
  • "balances": [
    ]
}

Retrieve end of day balances

This returns end of day balances for the specified date.

Authorizations:
JWT
query Parameters
date
string <date>

Up to 30 days prior to the current business date can be specified. If not specified, EOD balance for the previous day is returned.

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 1,
  • "has_next": false,
  • "data": [
    ]
}

Transactions

From this endpoint, you can call the following Transactions API.

Search transactions

This returns a list of transactions.

Authorizations:
JWT
query Parameters
asset
string

Asset Code

status
string
Enum: "PENDING" "BROADCASTED" "CONFIRMED" "FAILED"

Status

organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

wallet_id
string

Wallet Id (UUID)

external_reference
string

External reference in the backend vault platform

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 0,
  • "has_next": true,
  • "data": [
    ]
}

Get a transaction by Id

This returns a transaction by Id.

Authorizations:
JWT
path Parameters
transaction_id
required
string

Transaction Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "wallet_id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "direction": "IN",
  • "asset": "BTC",
  • "amount": 41.2914,
  • "fees": 0,
  • "created_at": "2024-01-01T00:00:00Z",
  • "transaction_type": "TRANSFER_IN",
  • "status": "CONFIRMED",
  • "tx_hash": "fc3e6ef2be355406b5785103415b2d0d1f12ef4d427e0f4303cb2b2a21ca0674",
  • "sender_address": "bc1qmgtfm9gjcvn8dakzxp8np2j0jmyx7tf9y84ngfss73ax6ck62ndsattwc2",
  • "receiver_address": "bc1q58we4lxam0xua67498mvqn6zhe4ce85m4uw7pgskfq3r23gq8wcszrv52p",
  • "note": "Deposit",
  • "created_by": "e625eb30-8a82-4086-8f11-3f1e36ecb6cc",
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "external_reference": "790ab8d1-04db-4c11-97c0-0ebeb1491ba4",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "account": "12345"
}

Estimate fee for a transaction

This returns an estimated fee for a transaction.

Authorizations:
JWT
Request Body schema: application/json
required
operation
string
Enum: "TRANSFER" "CONTRACT_CALL" "RAW"

Default TRANSFER. CONTRACT_CALL and RAW are currently not supported.

wallet_id
string
asset
string
amount
string

Use numeric string to avoid rounding errors in numbers.

fee_level
string
Enum: "LOW" "MEDIUM" "HIGH" "CUSTOM"

Required except for Solana.

customFeeUtxo (object) or customFeePerTx (object) or customFeeEip1559 (object) or customFeeNonEip1559 (object)
max_fee
string
destAddress (object) or destWhitelist (object) or destWallet (object)

Destination of the transaction. It has to be pre-configured within the same workspace as the source wallet.

object
note
string

Responses

Request samples

Content type
application/json
{
  • "operation": "TRANSFER",
  • "wallet_id": "string",
  • "asset": "string",
  • "amount": "string",
  • "fee_level": "LOW",
  • "custom_fee": {
    },
  • "max_fee": "string",
  • "destination": {
    },
  • "extra_params": {
    },
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "estimated_fee": 0.0001
}

Whitelists

From this endpoint, you can call the following Whitelist API.

Search whitelists

This returns a list of wallets.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

external_reference
string

External reference in the backend vault platform

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a whitelist by Id

This returns a whitelist by Id.

Authorizations:
JWT
path Parameters
whitelist_id
required
string

Whitelist Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "6a22c878-2150-4ccc-9048-1d5083e78459",
  • "name": "Exchange ABC",
  • "addresses": [
    ],
  • "workspace": "efdb9b0a-3e8a-4d0d-be01-c3aa6d14007b",
  • "external_reference": "wl_123",
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731"
}

Users

From this endpoint, you can call the following User API.

Search users

This returns a list of users.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a user by Id

This returns a user by Id.

Authorizations:
JWT
path Parameters
user_id
required
string

User Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "eae8aeff-bcf8-4544-ac7d-fc8b1a3b8859",
  • "name": "John Doe",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731"
}

Search user groups

This returns a list of user groups.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 1,
  • "has_next": false,
  • "data": [
    ]
}

Get a user group by Id

This returns a user group by Id.

Authorizations:
JWT
path Parameters
group_id
required
string

User Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "6a22c878-2150-4ccc-9048-1d5083e78459",
  • "name": "User ABC",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "accounts": [
    ],
  • "members": [
    ]
}

Assets

From this endpoint, you can call the following Asset API.

Search supported assets

This returns a list of supported assets in Komainu.

Authorizations:
JWT
query Parameters
page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Accounts

From this endpoint, you can call the following Account API.

Search Accounts

This returns a list of your accounts in Komainu.

Authorizations:
JWT
query Parameters
page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Workspaces

From this endpoint, you can call the following Workspace API.

Search Workspaces

This returns a list of your workspaces in Komainu.

Authorizations:
JWT
query Parameters
page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Ethereum

From this endpoint, you can call the following Ethereum Staking API.

Search Ethereum stakes

This returns a list of Ethereum stakes.

Authorizations:
JWT
query Parameters
blockchain_state
string
Enum: "unknown" "unstaked" "deposit_in_progress" "pending_initialized" "pending_queued" "active_ongoing" "active_exiting" "active_slashed" "exited_unslashed" "exited_slashed" "withdrawal_possible" "withdrawal_done"

Status

organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

wallet_id
string

Wallet Id (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 0,
  • "has_next": true,
  • "data": [
    ]
}

Solana

From this endpoint, you can call the following Solana Staking API.

Search Solana stakes

This returns a list of Solana stakes.

Authorizations:
JWT
query Parameters
blockchain_state
string
Enum: "active" "inactive" "activating" "deactivating" "withdrawn"

Status

organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

wallet_id
string

Wallet Id (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "count": 0,
  • "has_next": true,
  • "data": [
    ]
}

Rewards

From this endpoint, you can call the following Staking Rewards API.

Search staking daily rewards

This returns a list of staking daily rewards. By default, the result is for the last 7 days ordered by date descending

Authorizations:
JWT
query Parameters
organization
string

Organization Id

account
string

Account Number

workspace
string

Workspace (UUID)

date_from
string <date>

Date from (YYYY-MM-DD)

date_to
string <date>

Date to (YYYY-MM-DD)

asset
string

Asset

wallet_id
string

Wallet Id (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Portfolios

From this endpoint, you can call the following Collateral Portfolio API.

Search portfolios

This returns a list of portfolios.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

account
string

Account Number

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a portfolio by Id

This returns a portfolio by Id.

Authorizations:
JWT
path Parameters
portfolio_id
required
string

Portfolio Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "name": "Exchange Portfolio",
  • "wallets": [
    ],
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "type": "EXCHANGE",
  • "status": "ACTIVE",
  • "external_reference": "pf_123"
}

Operations

From this endpoint, you can call the following Collateral Operations API. Refer to Requests API to create a collateral operation.

Search collateral operations

This returns a list of collateral operations.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

account
string

Account Number

portfolio_id
string

Portfolio Id (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a collateral operation by Id

This returns a collateral operation by Id.

Authorizations:
JWT
path Parameters
operation_id
required
string

Operation Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "operation_type": "DELEGATE",
  • "status": "COMPLETED",
  • "amount": 100,
  • "asset": "BTC",
  • "portfolio_id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731",
  • "created_at": "2025-01-01T00:00:00Z",
  • "created_by": "e625eb30-8a82-4086-8f11-3f1e36ecb6cc"
}

Settlements

From this endpoint, you can call the following Collateral Settlement API.

Search settlements

This returns a list of settlements.

Authorizations:
JWT
query Parameters
organization
string

Organization Id

account
string

Account Number

portfolio_id
string

Portfolio Id (UUID)

page
integer

The page number. Default is 1.

page_size
integer

The number of record per page. Default is 20 and maximum is 200.

limit
integer

(Deprecated) The number of record per page. Default is 20 and maximum is 200.

offset
integer

(Deprecated) Offset (e.g. 0)

Responses

Response samples

Content type
application/json
{
  • "page": 1,
  • "count": 2,
  • "has_next": false,
  • "data": [
    ]
}

Get a settlement by Id

This returns a settlement by Id.

Authorizations:
JWT
path Parameters
settlement_id
required
string

Settlement Id (UUID, e.g. 476608af-6003-4252-8360-38a7b8f53c58)

Responses

Response samples

Content type
application/json
{
  • "id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "status": "COMPLETED",
  • "started_at": "2025-01-01T00:00:00Z",
  • "completed_at": "2025-01-01T00:00:00Z",
  • "instructions": [
    ],
  • "portfolio_id": "5742c325-17a6-44cf-99ac-e79d57afe572",
  • "account": "12345",
  • "organization": "cf902a83-f795-4955-b39b-9f7edfc5b731"
}