👋
Welcome to Stokn.io
  • 👋Welcome to Stokn.io
  • Overview
    • 💡What we do?
    • 🚀Our Features
      • Wallet as a Service
      • Trading as a Service
      • Staking as a Service
      • Portfolio ESG Scoring
      • KYC, KYB, KYT
    • 📱White Label Mobile App
  • USE CASES
    • đŸĻFor NeoBanks, Fintechs, Asset Managers
    • 👨‍đŸ’ŧFor Independant wealth managers
    • 💰For Crypto-Payments
  • HOW TO USE OUR API
  • đŸŽ¯Overview
  • 📝Step 1 - User Account Creation
  • 🔍Step 2 - User KYC
  • â„šī¸Step 3 - User Account Information
  • đŸ’ĩStep 4 - User Deposit & Withdrawal
  • 🔄Step 5 - Crypto conversion
  • 🔐Step 6 - User Get Wallet Information
  • 💸Step 7 - Dollar Cost Average
  • đŸŒŋStep 8 - Scoring ESG
Powered by GitBook
On this page

Step 5 - Crypto conversion

PreviousStep 4 - User Deposit & WithdrawalNextStep 6 - User Get Wallet Information

Last updated 1 year ago

User can convert one crypto to another. The conversion will be instantly credited on the wallet of the user.

1 - The conversion can be completed using the following endpoint. You will need to provide the AccountId, the token to be changed, the destination token and the quantity.

OAuth: user_auth

2 - When you know the token you want to change, you can check all the related destination tokens using this endpoint:

OAuth: client_auth

3 - You can also check all the trading pairs available on Stokn using:

OAuth: client_auth

🔄
get
Authorizations
Path parameters
fromSlugstringRequired
Responses
200
OK
*/*
get
GET /v1/convert/{fromSlug} 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"
}
get
Authorizations
Responses
200
OK
*/*
get
GET /v1/convert/tradingPairs HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "data": [
    "text"
  ],
  "errorCode": 1,
  "errorMessage": "text"
}
  • POST/v1/convert
  • GET/v1/convert/{fromSlug}
  • GET/v1/convert/tradingPairs
post
Authorizations
Body
Responses
200
OK
*/*
post
POST /v1/convert HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 370

{
  "jwt": {
    "tokenValue": "text",
    "issuedAt": "2025-06-01T11:04:13.655Z",
    "expiresAt": "2025-06-01T11:04:13.655Z",
    "headers": {
      "ANY_ADDITIONAL_PROPERTY": {}
    },
    "claims": {
      "ANY_ADDITIONAL_PROPERTY": {}
    },
    "id": "text",
    "issuer": "text",
    "notBefore": "2025-06-01T11:04:13.655Z",
    "subject": "text",
    "audience": [
      "text"
    ]
  },
  "tradingOrderView": {
    "accountId": "text",
    "from": "text",
    "to": "text",
    "quantity": 1
  }
}
200

OK

{
  "success": true,
  "data": [
    {
      "accountId": "text",
      "portfolioId": "text",
      "from": {
        "id": "text",
        "operationId": "text",
        "accountId": "text",
        "portfolioId": "text",
        "transactionSide": "CREDIT",
        "transactionType": "FEES",
        "asset": "text",
        "amount": 1,
        "creationTs": "2025-06-01T11:04:13.655Z"
      },
      "to": {
        "id": "text",
        "operationId": "text",
        "accountId": "text",
        "portfolioId": "text",
        "transactionSide": "CREDIT",
        "transactionType": "FEES",
        "asset": "text",
        "amount": 1,
        "creationTs": "2025-06-01T11:04:13.655Z"
      },
      "fees": {
        "id": "text",
        "operationId": "text",
        "accountId": "text",
        "portfolioId": "text",
        "transactionSide": "CREDIT",
        "transactionType": "FEES",
        "asset": "text",
        "amount": 1,
        "creationTs": "2025-06-01T11:04:13.655Z"
      }
    }
  ],
  "errorCode": 1,
  "errorMessage": "text"
}