πŸ’΅Step 4 - User Deposit & Withdrawal

The User will need different deposit address according to the coin selected and the network.

1 - In order to realize a deposit,

Get deposit on chain address

get
Authorizations
Path parameters
accountIdstringRequired
assetstringRequired
networkstringRequired
Responses
200
OK
*/*
get
GET /v1/wallet/deposit/{accountId}/{asset}/{network} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "data": {
    "coin": "text",
    "network": "text",
    "address": "text"
  },
  "errorCode": 1,
  "errorMessage": "text"
}

The Trading Portfolio (PortfolioId) will be associated with an AccountId. This means that the crypto deposit, will automatically be credited to the Trading Portfolio, which is the main portfolio of the AccountId.

OAuth: client_auth

2 - To obtain the history of all the deposits of a given AccountId, you can use the following endpoint:

Get deposit history on chain

get
Authorizations
Path parameters
accountIdstringRequired
Responses
200
OK
*/*
get
GET /v1/wallet/deposit/{accountId}/history HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "data": [
    {
      "ts": "2025-07-11T20:59:31.737Z",
      "txId": "text",
      "coin": "text",
      "network": "text",
      "address": "text",
      "amount": 1
    }
  ],
  "errorCode": 1,
  "errorMessage": "text"
}

OAuth: client_auth

3 - Using the following endpoint, you can also consult the list of the blockchains network available on Stokn for deposit:

Get network of coins

get
Authorizations
Path parameters
slugstringRequired
Responses
200
OK
*/*
Responsestring
get
GET /v1/wallet/deposit/networks/all/{slug} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

text

OAuth: client_auth

4 - Using the following endpoint, you can also consult the list of coins/tokens available on Stokn for deposit:

Get available coins for deposit

get
Authorizations
Responses
200
OK
*/*
get
GET /v1/wallet/deposit/available-coins HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "data": [
    {
      "slug": "text",
      "name": "text",
      "logoUrl": "text",
      "availableNetworks": [
        "text"
      ]
    }
  ],
  "errorCode": 1,
  "errorMessage": "text"
}

OAuth: client_auth

5 - This is the information that must be entered to make a withdrawal: account ID, asset, network, destination address.

post
Authorizations
Body
accountIdstringOptional
networkstring Β· enumOptionalPossible values:
addressstringOptional
assetstringOptional
amountnumberOptional
Responses
200
OK
*/*
post
POST /v1/wallet/withdraw HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "accountId": "text",
  "network": "ETH",
  "address": "text",
  "asset": "text",
  "amount": 1
}
200

OK

{
  "success": true,
  "data": {
    "accountId": "text",
    "amount": 1,
    "asset": "text",
    "network": "text",
    "address": "text",
    "success": true,
    "message": "text",
    "portfolioId": "text",
    "operationId": "text"
  },
  "errorCode": 1,
  "errorMessage": "text"
}

OAuth: user_auth

Last updated