# Withdrawals/Transfers

{% tabs %}
{% tab title="Create Transfer" %}

### Create Transfer

***

### API POST Fields&#x20;

In addition to the [Main Fields](/wallex-pay/merchant-tools/custom-apis/api-basics.md#main-fields-these-fields-will-be-here-for-all-calls) described in the API Basics > [Introduction](/wallex-pay/merchant-tools/custom-apis/api-basics.md#introduction)

**Create Transfer**

<table><thead><tr><th width="200" align="center">Field Name</th><th width="328" align="center">Description</th><th align="center">Required?</th></tr></thead><tbody><tr><td align="center">cmd</td><td align="center">create_transfer</td><td align="center">Yes</td></tr><tr><td align="center">amount</td><td align="center">The amount of the transfer in the currency below.</td><td align="center">Yes</td></tr><tr><td align="center">currency</td><td align="center">The cryptocurrency to withdraw. (BTC)</td><td align="center">Yes</td></tr><tr><td align="center">merchant</td><td align="center">The merchant ID to send the funds to, either this OR pbntag must be specified.<br>Remember: this is a merchant ID and not a username.</td><td align="center">See Desc</td></tr><tr><td align="center">toaddress</td><td align="center">The toaddress to send the funds to, either this OR merchant must be specified.</td><td align="center">See Desc</td></tr><tr><td align="center">auto_confirm</td><td align="center">If set to 1, withdrawal will complete without email confirmation.</td><td align="center">No</td></tr></tbody></table>

`Method:`` `<mark style="color:blue;">`POST`</mark>\
`URL:` [`http://wallexpay.io/api/create_transfer`](http://wallexpay.io/api/create_transfer)

### **API Response**

A successful call to get the 'create\_transfer' command will give you a result similar to this (JSON):

```json
{
  "error": "ok",
  "result": {
    "id": "string",
    "status": 0
  }
}
```

{% hint style="info" %}
**Note:** Transfers are performed as internal coin transfers/accounting entries when possible. For coins not supporting that ability a withdrawal is created instead.
{% endhint %}
{% endtab %}

{% tab title="Convert Coins" %}

### **Convert Coins**

***

### **API POST Fields**&#x20;

In addition to the [Main Fields](/wallex-pay/merchant-tools/custom-apis/api-basics.md#main-fields-these-fields-will-be-here-for-all-calls) described in the API Basics > [Introduction](/wallex-pay/merchant-tools/custom-apis/api-basics.md#introduction)

**Convert Coins**

<table><thead><tr><th width="202" align="center">Field Name</th><th width="323" align="center">Description</th><th align="center">Required?</th></tr></thead><tbody><tr><td align="center">cmd</td><td align="center">convert</td><td align="center">Yes</td></tr><tr><td align="center">to</td><td align="center">The cryptocurrency to convert to. (USD, NGN, etc.)</td><td align="center">Yes</td></tr></tbody></table>

`Method:`` `<mark style="color:blue;">`POST`</mark>\
`URL:` [`http://wallexpay.io/api/convert`](http://wallexpay.io/api/convert)

### **API Response**

A successful call to the 'convert' command will give you a result similar to this (JSON):

```json
{
  "error": "ok",
  "result": "61588"
}
```

{% endtab %}

{% tab title="Get Withdrawal History" %}

### **Get Withdrawal History**

***

### API POST Fields&#x20;

In addition to the [Main Fields](/wallex-pay/merchant-tools/custom-apis/api-basics.md#main-fields-these-fields-will-be-here-for-all-calls) described in the API Basics > [Introduction](/wallex-pay/merchant-tools/custom-apis/api-basics.md#introduction)

<table><thead><tr><th width="202" align="center">Field Name</th><th width="323" align="center">Description</th><th align="center">Required?</th></tr></thead><tbody><tr><td align="center">cmd</td><td align="center">get_withdrawal_history</td><td align="center">Yes</td></tr><tr><td align="center">limit</td><td align="center">The maximum number of withdrawals to return from 1-100. (default: 25)</td><td align="center">No</td></tr><tr><td align="center">start</td><td align="center">What withdrawals # to start from (for iteration/pagination.) (default: 0, starts with your newest withdrawals.)</td><td align="center">No</td></tr></tbody></table>

`Method:`` `<mark style="color:blue;">`POST`</mark>\
`URL:` [`http://wallexpay.io/api/get_withdrawal_history`](http://wallexpay.io/api/get_withdrawal_history)

### **API Response**

A successful call to get the 'get\_withdrawal\_history' command will give you a result similar to this (JSON):

```json
{
  "error": "ok",
  "result": [
    {
      "id": "CW...",
      "time_created": 1391924372,
      "status": 2,
      "status_text": "Complete",
      "coin": "BTC",
      "amount": 40000000,
      "amountf": "0.40000000",
      "send_address": "1BitcoinAddress",
      "send_txid": "hex_txid"
    }
  ]
}
```

**The result will have the following fields:**

* id = The withdrawal ID.
* time\_created = The time the withdrawal request was submitted.
* status = The status of the withdrawal (-1 = Cancelled, 0 = Waiting for email confirmation, 1 = Pending, 2 = Complete).
* status\_text = The status of the withdrawal in text format.
* coin = The ticker symbol of the coin for the withdrawal.
* amount = The amount of the withdrawal (in Satoshis).
* amountf = The amount of the withdrawal (as a floating point number).
* send\_address = The address the withdrawal was sent to. (only in response if status == 2)
* send\_txid = The coin TX ID of the send. (only in response if status == 2)
  {% endtab %}

{% tab title="Get Withdrawal Info" %}

### **Get Withdrawal Info**

***

### API POST Fields&#x20;

In addition to the [Main Fields](/wallex-pay/merchant-tools/custom-apis/api-basics.md#main-fields-these-fields-will-be-here-for-all-calls) described in the API Basics > [Introduction](/wallex-pay/merchant-tools/custom-apis/api-basics.md#introduction)

**Get Withdrawal Information**

<table><thead><tr><th width="202" align="center">Field Name</th><th width="323" align="center">Description</th><th align="center">Required?</th></tr></thead><tbody><tr><td align="center">cmd</td><td align="center">get_withdrawal_info</td><td align="center">Yes</td></tr><tr><td align="center">id</td><td align="center">The withdrawal ID to query.</td><td align="center">Yes</td></tr></tbody></table>

`Method:`` `<mark style="color:blue;">`POST`</mark>\
`URL:` [`http://wallexpay.io/api/get_withdrawal_info`](http://wallexpay.io/api/get_withdrawal_info)

### **API Response**

A successful call to get the get\_withdrawal\_info' command will give you a result similar to this (JSON):

```json
{
  "error": "ok",
  "result": {
    "time_created": 1391924372,
    "status": 2,
    "status_text": "Complete",
    "coin": "BTC",
    "amount": 40000000,
    "amountf": "0.40000000",
    "send_address": "1BitcoinAddress",
    "send_txid": "hex_txid"
  }
}
```

**The result will have the following fields:**

* time\_created = The time the withdrawal request was submitted.
* status = The status of the withdrawal (-1 = Cancelled, 0 = Waiting for email confirmation, 1 = Pending, 2 = Complete).
* status\_text = The status of the withdrawal in text format.
* coin = The ticker symbol of the coin for the withdrawal.
* amount = The amount of the withdrawal (in Satoshis).
* amountf = The amount of the withdrawal (as a floating point number).
* send\_address = The address the withdrawal was sent to. (only in response if status == 2)
* send\_txid = The coin TX ID of the send. (only in response if status == 2)
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://experience.wallex.global/wallex-pay/merchant-tools/custom-apis/withdrawals-transfers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
