KIIEX – powered by KiiChain
  • Learn
    • What is KIIEX?
    • What is KiiChain?
    • KiiChain
      • Vision of KiiChain
      • Use Cases
      • Roadmap
      • Whitepaper
    • Tokenomics
      • Intro Coin Details
      • Coin Unlocking Schedule
      • Utility
      • Evergreen Model
    • Getting Started
      • Get a Wallet
      • Set Up a Web Wallet
      • Connect Wallet to Explorer App
  • Kii Ambassadors
  • CONNECT TO KIIEX
    • Set up your KIIEX Account
      • Upgrade your Account to Enterprise Level
    • Stablecoin FX Quick Start
      • Swap USDT to COPM with UI
    • KIIEX API's
      • System
      • User
      • Authentication
      • Models
  • BUILD ON KIICHAIN
    • Developer Hub
    • Testnet Oro
    • Endpoints - Cosmos
      • EVM
        • VM
        • ERC20
        • FeeMarket
      • IBC
      • Kiichain
        • TokenFactory
      • Cosmwasm
      • Cosmos
        • Auth
        • Authz
        • Bank
        • Tendermint
        • Consensus
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Slashing
        • Staking
        • Tx
        • Upgrade
    • Developer Tools
      • RWA Protocol
      • Rust SDK
      • JS/TS SDK
        • Kiijs-evm
        • Kiijs-proto
        • Kiijs-utils
      • Deploy a smart contract
      • Deploy a dApp
      • Testnet faucet
    • Smart Contracts
    • Modules
      • TokenFactory
      • EVM
  • Precompiled contracts
  • Validate the Network
    • Getting Started
      • What is a delegator?
      • What is a validator?
    • Run a Validator / Full Node
      • Getting started
      • Step-by-Step Guide
        • Becoming a Validator
        • Recovering Legacy Addresses
      • Maintaining a validator
      • Incentive
      • Technical requirements
      • Validator Security
    • Economics
      • Staking Requirements
      • Delegation / Staking
      • Rewards
      • Block Rewards Formula
      • APR
    • Delegator Information
      • Choosing a validator
      • Directives of delegators
      • Incentive to stake
      • Security considerations
      • Risks to consider
Powered by GitBook
LogoLogo
On this page

Was this helpful?

Export as PDF
  1. CONNECT TO KIIEX

Stablecoin FX Quick Start

This guide explains how to swap any stablecoin using our KIIEX API. It covers retrieving balances, checking the current exchange rate, sending the order and verifying execution.

PreviousUpgrade your Account to Enterprise LevelNextSwap USDT to COPM with UI

Last updated 16 hours ago

Was this helpful?

Requirements to be able to trade stablecoins on KIIEX, via dashboard or API:

  • Have a user

  • Have an account level 1 at least (to upgrade from level 0 to level 1, you need to complete our KYC verification inside your user settings)

  • Have balances on any stablecoin

Endpoints

Staging URL :

https://apstage.proxy.kiiex.io/ap

Prod URL :

https://alphaprod.proxy.kiiex.io/ap

Swap Workflow example

For this example will assume a goal and specify what to do in order, also we'll provide you with all the endpoints related to each step. The goal is:

  • Swap USDT → COPM using a market order.

Prerequisites

These are the prerequisites for the step-by-step guide.

  1. Create your KIIEX account:

    1. Go to and click on login, and create your user

      1. You can also follow our guide on Set up your KIIEX Account

  2. Update your account from level 0 to level 1 by following our KYC flow to be able to swap

  3. Create your trader API Key on our panel to follow the next steps

Step-by-step

These are the steps to fully create a swap and withdraw it:

  1. Authenticate your user via api

    1. Authenticate your User via API

  2. Create a USDT deposit. If you have already created a deposit, check your current balance

    1. Create Deposit

    2. POST /GetAccountPositions

  3. Get the current COPM/USDT rate

    1. Get Current Rate

  4. Create market order (buy COPM)

    1. Create a SWAP

  5. Verify order was filled

    1. Get SWAP status

  6. Get trade details (swap info)

    1. POST /GetTradesHistory

  7. Confirm the new COPM balance using the get account positions endpoint

    1. Get Account Balances

  8. Create a COPM withdrawal, it could be to another wallet or to your bank account

    1. Create a Withdrawal

  9. Check your COPM withdrawal status

    1. Check Withdrawal status

How do I perform the swap workflow using the API?

API endpoints

Authenticate your User via API

Create Deposit

Get Account Balances

Get Current Rate

Create a SWAP

Get SWAP status

Create a Withdrawal

Check Withdrawal status

https://kiiex.io/
  • Endpoints
  • Swap Workflow example
  • Prerequisites
  • Step-by-step
  • API endpoints
  • Authenticate your User via API
  • POSTAuthenticate user session
  • Create Deposit
  • POSTCreate a new deposit ticket
  • Get Account Balances
  • POSTGet account positions (balances)
  • Get Current Rate
  • POSTGet market snapshot
  • Create a SWAP
  • POSTCreate a new order
  • Get SWAP status
  • POSTGet single order status
  • POSTGet trades history
  • Create a Withdrawal
  • POSTInitiates the withdrawal of funds from an account
  • Check Withdrawal status
  • POSTReturns an array of withdraw tickets from the specified OMS and Account

Authenticate user session

post
Body
one ofOptional
Responses
200
Authentication result
application/json
post
POST /ap/AuthenticateUser HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "APIKey": "text",
  "Signature": "text",
  "UserId": "text",
  "UserName": "text",
  "Nonce": "text"
}
200

Authentication result

{
  "authenticated": true,
  "user": {
    "userId": 1,
    "userName": "text",
    "email": "text",
    "emailVerified": true,
    "accountId": 1,
    "omsId": 1,
    "use2FA": true
  }
}

Create a new deposit ticket

post
Body
assetManagerIdintegerOptional
accountIdintegerOptional
assetIdintegerOptional
assetNamestring | nullableOptional
amountnumberOptional
omsIdintegerOptional
requestCodestring | nullableOptional
requestIPstring | nullableOptional
requestUserintegerOptional
requestUserNamestring | nullableOptional
operatorIdintegerOptional
StatusintegerOptional
feeAmtnumberOptional
updatedByUserintegerOptional
updatedByUserNamestring | nullableOptional
ticketNumberintegerOptional
depositInfostring | nullableOptional
createdTimestampstring · date-timeOptional
lastUpdateTimestampstring · date-timeOptional
commentsstring | nullableOptional
attachmentsstring | nullableOptional
Responses
200
Deposit ticket creation result
application/json
post
POST /ap/CreateDepositTicket HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 421

{
  "assetManagerId": 1,
  "accountId": 1,
  "assetId": 1,
  "assetName": "text",
  "amount": 1,
  "omsId": 1,
  "requestCode": "text",
  "requestIP": "text",
  "requestUser": 1,
  "requestUserName": "text",
  "operatorId": 1,
  "Status": 1,
  "feeAmt": 1,
  "updatedByUser": 1,
  "updatedByUserName": "text",
  "ticketNumber": 1,
  "depositInfo": "text",
  "createdTimestamp": "2025-06-17T11:07:53.039Z",
  "lastUpdateTimestamp": "2025-06-17T11:07:53.039Z",
  "comments": "text",
  "attachments": "text"
}
200

Deposit ticket creation result

{
  "success": true,
  "requestcode": "text"
}

Get account positions (balances)

post
Body
AccountIdintegerOptional
OMSIdintegerOptional
IncludePendingbooleanOptional
Responses
200
Account balances
application/json
post
POST /ap/GetAccountPositions HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "AccountId": 1,
  "OMSId": 1,
  "IncludePending": true
}
200

Account balances

[
  {
    "omsId": 1,
    "accountId": 1,
    "productSymbol": "text",
    "productId": 1,
    "amount": 1,
    "hold": 1
  }
]

Get market snapshot

post
Body
OMSIdintegerOptional
BaseCurrencystringOptional
QuoteCurrencystringOptional
InstrumentIdsstringOptional
Responses
200
Market data snapshot
application/json
post
POST /ap/GetLevel1SummaryMin HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "OMSId": 1,
  "BaseCurrency": "text",
  "QuoteCurrency": "text",
  "InstrumentIds": "text"
}
200

Market data snapshot

[
  [
    "text"
  ]
]

Create a new order

post
Body
InstrumentIdintegerOptional
OMSIdintegerOptional
AccountIdintegerOptional
TimeInForceintegerOptional
ClientOrderIdintegerOptional
OrderIdOCOintegerOptional
UseDisplayQuantitybooleanOptional
SideintegerOptional
quantitynumberOptional
OrderTypeintegerOptional
PegPriceTypeintegerOptional
LimitPricenumberOptional
PostOnlybooleanOptional
Responses
200
Order status
application/json
post
POST /ap/SendOrder HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 201

{
  "InstrumentId": 1,
  "OMSId": 1,
  "AccountId": 1,
  "TimeInForce": 1,
  "ClientOrderId": 1,
  "OrderIdOCO": 1,
  "UseDisplayQuantity": true,
  "Side": 1,
  "quantity": 1,
  "OrderType": 1,
  "PegPriceType": 1,
  "LimitPrice": 1,
  "PostOnly": true
}
200

Order status

{
  "status": "text",
  "errormsg": "text",
  "OrderId": 1
}

Get single order status

post
Body
omsIdintegerOptional
accountIdintegerOptional
orderIdintegerOptional
Responses
200
Order status details
application/json
post
POST /ap/GetOrderStatus HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "omsId": 1,
  "accountId": 1,
  "orderId": 1
}
200

Order status details

{
  "OrderId": 1,
  "OrderState": "text",
  "QuantityExecuted": 1,
  "AvgPrice": 1
}

Get trades history

post
Body
omsIdintegerOptional
accountIdintegerOptional
instrumentIdintegerOptional
tradeIdintegerOptional
orderIdintegerOptional
userIdintegerOptional
startTimestampintegerOptional
endTimestampintegerOptional
depthintegerOptional
startIndexintegerOptional
executionIdintegerOptional
Responses
200
List of executed trades
application/json
post
POST /ap/GetTradesHistory HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 154

{
  "omsId": 1,
  "accountId": 1,
  "instrumentId": 1,
  "tradeId": 1,
  "orderId": 1,
  "userId": 1,
  "startTimestamp": 1,
  "endTimestamp": 1,
  "depth": 1,
  "startIndex": 1,
  "executionId": 1
}
200

List of executed trades

[
  {
    "tradeId": 1,
    "orderId": 1,
    "quantity": 1,
    "price": 1
  }
]

Initiates the withdrawal of funds from an account

post
Body
OMSIdintegerOptional
AccountIdintegerOptional
ProductIdintegerOptional
AmountnumberOptional
feeAmountnumberOptional
TemplateFormobjectOptional
TemplateTypestringOptional
Responses
200
Withdrawal request result
application/json
post
POST /ap/CreateWithdrawTicket HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "OMSId": 1,
  "AccountId": 1,
  "ProductId": 1,
  "Amount": 1,
  "feeAmount": 1,
  "TemplateForm": {},
  "TemplateType": "text"
}
200

Withdrawal request result

{
  "result": true,
  "errormsg": "text",
  "errorcode": 1,
  "detail": "text"
}

Returns an array of withdraw tickets from the specified OMS and Account

post
Body
OMSIdintegerOptional
AccountIdintegerOptional
StartIndexintegerOptional
LimitintegerOptional
Responses
200
List of withdraw tickets
application/json
post
POST /ap/GetWithdrawTickets HTTP/1.1
Host: apstage.proxy.kiiex.io
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "OMSId": 1,
  "AccountId": 1,
  "StartIndex": 1,
  "Limit": 1
}
200

List of withdraw tickets

[
  {
    "assetManagerId": 1,
    "accountId": 1,
    "assetId": 1,
    "assetName": "text",
    "amount": 1,
    "templateForm": "text",
    "templateFormType": "text",
    "omsId": 1,
    "requestCode": "text",
    "requestIP": "text",
    "requestUserId": 1,
    "requestUserName": "text",
    "operatorId": 1,
    "Status": 1,
    "feeAmt": 1,
    "updatedByUser": 1,
    "updatedByUserName": "text",
    "ticketNumber": 1,
    "createdTimestamp": "2025-06-17T11:07:53.039Z",
    "lastUpdateTimestamp": "2025-06-17T11:07:53.039Z",
    "Comments": "text",
    "Attachments": "text",
    "AuditLog": "text"
  }
]