Copy link
Using API for wallet
Postman collection with all endpoints - Using_API_for_wallet.postman_collection.zip
Login to account
You need to get api keys for your account and login to your account in order to get the token necessary for creating wallets and further actions on them.
Parameters
Body
- publicKey
*
string
- privateKey
*
string
- walletId
*
string
- passphrase
*
string
Responses
- 200:OK{token: "string"}
- 200:OK
Example
{token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxOTIzNjAyNjM3OTE4MDFkMGQzODgzNiIsInVzZXIiOiI2MDlhNjM0MGU1ZTFjZjAyMTU2ZDBkZjciLCJpYXQiOjE2NjQzMTg5MjksImV4cCI6MTY2NDQwNTMyOX0.mXXCUt8RTjFBejwMTBXaZX6Bj9P2h1xOzJqfH7GvKaA"} - 400:Bad request
If request body parameters are empty or have incorrect type (not string)
{status: "fail",data: {message: ["publicKey should not be empty","privateKey should not be empty"]}} - 401
If you use incorrect account token
{status: "fail",data: {message: "Unauthorized"}}
Wallet creating
Parameters
Path
- currencyId
*
string
Body
- typeWallet
*
string
- privateKey
string
- isMnemonic
boolean
if true then fill mnemonic phrase to privateKey parameter
- setMain
boolean
- password
string
- typeWallet
string
merchant, user
Responses
- 200:OK{data: {id: "string",address: "string",balance: 0,balanceUSD: 0,passphrase: "string"}}
- 200:OK
Example
{data: {id: "63321da650a1280200bcacca",address: "0x3Cf221e9AFdCc4792c5fF7631CB84b6e8a066c7a",balance: "0",balanceUSD: "0",passphrase: "d1295f73-1cfc-4bde-bcca-c496944b9dd5"}} - 400:Bad request{message: "This currency is not supported."}
- 401{status: "fail",data: {message: "Unauthorized"}}
You can login to wallet and get wallet access token necessary for witdrawal from wallet and for getting wallet ballance. You need to get api keys for your account, also you need wallet Id and wallet passphrase.
Wallet login
Parameters
Body
- walletId
*
string
- passphrase
*
string
- publicKey
*
string
- privateKey
*
string
Responses
- 200:OK{token: "string"}
- 200:OK
Example
{token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxOTIzNjAyNjM3OTE4MDFkMGQzODgzNiIsInVzZXIiOiI2MDlhNjM0MGU1ZTFjZjAyMTU2ZDBkZjciLCJpYXQiOjE2NjQzMTg5MjksImV4cCI6MTY2NDQwNTMyOX0.mXXCUt8RTjFBejwMTBXaZX6Bj9P2h1xOzJqfH7GvKaA"} - 400:Bad request{status: "fail",data: {message: ["publicKey should not be empty"]}}
- 401{status: "fail",data: {message: "Unauthorized"}}
View private key
Responses
- 200:OK{data: "string"}
- 200:OK
Example
{data:"0xf1a8eabb865942f710307d1ae6f313d88612dc67f76a983a572487d0b3d16de0"} - 401{status: "fail",data: {message: "Unauthorized"}}
View mnemonic phrase
Responses
- 200:OK{data: "string"}
- 200:OK
Example
{data: "snow drift panel frost what reward session pupil pause scout junk purpose"} - 401{status: "fail",data: {message: "Unauthorized"}}
Getting the maximum possible withdrawal amount
Parameters
Body
- to
*
string
- currencyToken
*
string
- password
string
- sign
string
base64 format
Responses
- 200:OK{data: {amount: "number"}}
- 200:OK
Example
{data: {amount: "0"}} - 401{status: "fail",data: {message: "Unauthorized."}}
Withdrawal from wallet
Parameters
Body
- to
*
string
- amount
*
number
- currencyToken
string
Used if withdrawals are made from the account’s wallet
- comment
string
Use for TON and USDT TON
- password
string
- sign
string
base64 format
Responses
- 200:OK{data: {id: "string"}}
- 200:OK
Example
{data: {id: "63321f4d50a1280200bcaccd"}} - 400:Bad request{status: "fail",data: {message: "Address INVALID"}}
- 401{status: "fail",data: {message: "Unauthorized"}}
Internal transfer for client wallets
Parameters
Body
- to
*
string
- amount
*
number
Responses
- 200:OK{"data": {"id": "String"}}
- 200:OK
Example
{"data": {"id": "634ecbb9053b310076f5c309"}} - 400:Bad request{"status": "fail","data": {"message": "Wallet not found in this account."}}
Get wallet ballance
Responses
- 200:OK{data: {balance: "string",balanceUSD: "string",holdBalance: "string",availableBalance: "string",availableBalanceUSD: "string",tokens: [{currencyId: "string",balance: "string",holdBalance: "string"}]}}
- 200:OK
Example
{data: {balance: "0.06728",holdBalance: "0",balanceUSD: "18.16",availableBalance: "0.06728",availableBalanceUSD: "18.16",tokens: [{currencyId: "60eee72676d1ef1761cf916c",balance: "5.42025",holdBalance: 0}]}} - 401{status: "fail",data: {message: "Unauthorized"}}