Swapspace
  • 📄APIS
    • 1️⃣Create deposit order
    • 2️⃣Deposit completed callback
    • 3️⃣Create withdraw order
  • 🖥️Merchant back office guidance
    • 📑KYB/ KYC
    • ®️Register
    • 📨Retrieve password
    • 📊Dashboard
      • 💹Deposit
      • 💲Withdraw
      • 💱Multi-Send
    • 🪙Deposit record
    • 🪙Withdrawal record
    • 💰Capital record
    • ⚙️Setting
      • 📧Change Email
      • 🔑Change Login password
      • 🧰Change Google key
      • ❤️Change White list
Powered by GitBook
On this page
  • Request Url
  • Request Type
  • Request
  • Response
  1. APIS

Create withdraw order

PreviousDeposit completed callbackNextKYB/ KYC

Last updated 9 months ago

Request Url

Request Type

POST

Request

param
type
necessary
max length
param description

block_chain

String

32

Block_chain name. eg:

TRC20='TRX_CHAIN' ERC20='ETH_CHAIN'

code

int

6

Merchant code.

eg:100101

order_time

int

10

Order time (unix timestamp)

token_name

String

32

Eg:(USDT or USDC or ETH) you can choose between

to_address

String

34

Withdraw to address

withdraw_amount

float

18

Withdraw amount

sign

String

36

A string encrypted with the hmac-sha256 algorithm based on the request parameter string and access_key.

About sign content:

Arrange the parameters in ascending order of key letters, connect the obtained parameter string (similar to a=1&b=2&c=3) with the user key (the user key is placed at the end), and finally use hmac-sha256 Encrypt the signature string .

eg:

String to be signed: block_chain=TRX_CHAIN&code=100105&order_time=1705895566&to_address=TL9qtZWi2PX2uZFRZ8RsrYxULVv9Zbax44&token_name=USDT&withdraw_amount=1000

Encrypted value: +Q0MlRL/PVPZIGcl91Nc0T9bFvv2iCQconLGOSYx/as=

!!! Note:

When parameters contain special characters, they must be escaped (urlencode) to comply with URL specifications

Response

param
type
param desc

code

int

response code 200 is success, esle is fail

msg

String

response message

About error code:

code
message

40000

system error

40001

param_error

40002

token name error

40003

user not found

40004

prohibit withdrawals

40005

sign error

40006

the address format is incorrect

40007

unsupported withdrawal from internal address

40008

insufficient balance

40009

the withdrawal quantity must be greater than expense

40010

request ip error

📄
3️⃣
https://api.swapspace.ai/admin/api/open/saveWithdraw