💵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
OAuth2clientCredentialsRequired
Token URL:
Path parameters
accountIdstringRequired
assetstringRequired
networkstringRequired
Responses
200

OK

*/*
get
/v1/wallet/deposit/{accountId}/{asset}/{network}
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
OAuth2clientCredentialsRequired
Token URL:
Path parameters
accountIdstringRequired
Responses
200

OK

*/*
get
/v1/wallet/deposit/{accountId}/history
GET /v1/wallet/deposit/{accountId}/history HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "data": [
    {
      "ts": "2025-11-14T22:55:11.231Z",
      "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
OAuth2clientCredentialsRequired
Token URL:
Path parameters
slugstringRequired
Responses
200

OK

*/*
Responsestring
get
/v1/wallet/deposit/networks/all/{slug}
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
OAuth2clientCredentialsRequired
Token URL:
Responses
200

OK

*/*
get
/v1/wallet/deposit/available-coins
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
OAuth2clientCredentialsRequired
Token URL:
Body
accountIdstringOptional
networkstring · enumOptionalPossible values:
addressstringOptional
assetstringOptional
amountnumberOptional
Responses
200

OK

*/*
post
/v1/wallet/withdraw
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