Crypto

Crypto Accounts

GET https://api.liquid.com/crypto_accounts

Get a list of crypto accounts.

[
    {
        "id": 72294,
        "currency": "BTC",
        "balance": 0.0,
        "reserved_balance": 0.0,
        "pusher_channel": "user_35258_account_btc",
        "lowest_offer_interest_rate": "0.00001",
        "highest_offer_interest_rate": "0.00200",
        "address": "19vvnmLKsqYbZDWugDGLNSKxd3oTmaKUpU",
        "currency_symbol": "₿",
        "minimum_withdraw": 0.02,
        "currency_type": "crypto"
    },
    ...
]

Crypto Withdrawals

GET https://api.liquid.com/crypto_withdrawals?currency={currency}

Get crypto withdrawal requests details.

Query Parameters

NameTypeDescription

address

string

User's Liquid crypto address.

timestamp

number

Only show withdrawal requests based on created_at at or after timestamp (timestamp in seconds).

state

string

State of withdrawal request. pending, processing, processed, cancelled, reverted

currency

string

Symbol of currency. eg. BTC

{
    "models": [
        {
            "id": 1,
            "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
            "amount": 1.5,
            "state": "awaiting_confirmation",
            "currency": "BTC",
            "withdrawal_fee": 0,
            "created_at": 1551264711,
            "updated_at": 1551264711,
            "payment_id": null
        }
    ],
    "current_page": 1,
    "total_pages": 100000
}

GET https://api.liquid.com/crypto_withdrawal_addresses?currency={currency}

Retrive list of withdrawal addresses.

Only withdrawal addresses with status = awaiting_confirmation, confirmed will be returned.

Path Parameters

NameTypeDescription

currency*

String

Symbol of crypto asset.

Eg. BTC

{
    "models": [
        {
            "id": 396,
            "address": "3kCHtS9HZDicTFeMfekjnBYY196iU1igW",
            "currency": "BTC",
            "network": null,
            "chain_name": "Bitcoin",
            "status": "confirmed",
            "label": "mobilewallet",
            "memo_type": null,
            "memo_value": null,
            "recipient_name": null,
            "crypto_exchange": null
        }

Crypto Withdrawals Supported Network

GET https://api.liquid.com/crypto_withdrawals/crypto_networks?currency={currency}

Get crypto withdrawals supported networks.

Path Parameters

NameTypeDescription

currency

string

Example: /crypto_withdrawals/crypto_networks?currency=USDC

[
    {
        "network": "ERC20",
        "currency": "USDC",
        "chain_name": "Ethereum",
        "root_currency": "ETH",
        "depositable": true,
        "withdrawable": true
    },
    {
        "network": "Stellar",
        "currency": "USDC",
        "chain_name": "Stellar",
        "root_currency": "XLM",
        "depositable": true,
        "withdrawable": true
    }
]

Create a Crypto Withdrawal

POST https://api.liquid.com/crypto_withdrawals

Request Body

NameTypeDescription

network

string

Please refer to GET Crypto Withdarawals Supported Network. If the asset to be withdrawn supports only one network, this field is not required. Otherwise, network must be specified.

auth_code

string

See explanation below.

currency

string

"crypto_withdrawal": {"currency": "BTC"}.

amount

string

"crypto_withdrawal": {"amount": "1.234"}

address

string

"crypto_withdrawal": {"address": "1BvBMSxxxx"}

payment_id

string

For XRP only.

memo_type

string

text, id, hash for XLM only.

memo_value

string

For XLM only.

// Sample Request
{
    "auth_code": "185823",
    "crypto_withdrawal": {
        "address": "0x91D4741e0C01bA74eCbBEQe6F99631cFFC3588f6",
        "currency": "USDC",
        "amount": "5000",
        "network": "ERC20"
    }
}

// Sample 200 Response
{
    "id": 1353,
    "address": "0x91D4741e0C01bA74eCbBEQe6F99631cFFC3588f6",
    "amount": 5000,
    "state": "pending",
    "currency": "USDC",
    "withdrawal_fee": 5.0,
    "created_at": 1568016450,
    "updated_at": 1568016450,
    "payment_id": null
}

NO-TOUCH MODE

Creating a crypto withdrawal requires user to interactively input 2FA code and confirm via email. This can be a problem if user is trying to build a fully automated system.

No-touch mode allows human interaction (auth token and email confirmation) to be omitted. No-touch mode can be enabled by adding at least one confirmed Whitelist IP.

// "auth_code" must be "000000" for NO-TOUCH MODE //
{
    "auth_code": "000000",
    "crypto_withdrawal":
    {
        "currency":"BTC",
        "amount":"1",
        "address":"1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
        "payment_id": null,
        "memo_type": null,
        "memo_value": null
    }
}

Cancel a Crypto Withdrawal

PUT https://api.liquid.com/crypto_withdrawal/{request_id}/cancel

Path Parameters

NameTypeDescription

request_id

string

Example crypto withdrawal request ID: 1351.

{
    "id": 1353,
    "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
    "amount": 1.0,
    "state": "cancelled",
    "currency": "BTC",
    "withdrawal_fee": 0.0,
    "created_at": 1568016450,
    "updated_at": 1568016450,
    "payment_id": null
}

Last updated