diff --git a/Private-RestAPI.md b/Private-RestAPI.md index 8e233d2b..a75ea3f0 100644 --- a/Private-RestAPI.md +++ b/Private-RestAPI.md @@ -662,6 +662,82 @@ Callback Parameter Sent to Client |requester_ip|requester_ip of the request| |request_date|time the request submitted | +#### Withdraw Coin by Username + +Client can view and use `username` option when sending crypto via TAPI. When successfully receiving a response body with status `success = 1` so client can confirm approve/reject withdraw via email received. Clik URL in the red box to confirm and green box to cancel request. + +![withdrawcoin](https://github.com/fivinsadesla/MAP-Documentation/assets/129377108/ce2c511b-fa5c-4941-a0d7-6a50acede84e) + +> When client choose confirm request, the sender's coins will decrease and the receiver's coins will increase. + +Request Body + +| Name | Type | Mandatory | Description | Value | default | +|-|-|-|-|-|-| +|`method`| string |yes|Specify the method you want to call |withdrawCoin|| +|`currency`|string|yes|Currency to withdraw|btc, ltc, doge, eth, etc|| +|`withdraw_amount`|numeric|yes|Amount to send|10.00000000|| +|`withdraw_memo`|string|no|Memo to be sent to the receiver, if supported by the asset platform. Exchanges use this memo for accepting deposits for certain assets.Example: Destination Tag (for Ripple)Message (for NXT)Memo (for BitShares)|a valid memo/message/destination tag|| +|`request_id`|alphanumeric max 255 char|yes|Custom string you need to provide to identify each withdrawal request.|request_id will be passed to callback call so your system can identify the request.d||| +|`withdraw_input_method`| |yes|Withdraw using method username or address |username|| +|`withdraw_username`|alphanumeric|yes|username withdraw from your request & followed by special character underscrore (_) or strip (-). Mandatory id withdraw_input_method = username ||| + +Response success `Withdraw Username (BNB)` +```json +{ + "success": 1, + "status": "wait", + "withdraw_currency": "aave", + "withdraw_address": "" + "withdraw_amount": "0.05000000", + "fee": "0.00000000", + "amount_after_fee": "0.05000000", + "submit_time": "1684723796", + "withdraw_id": "aave-163", + "txid": "", + "withdraw_username": "User_13" +} +``` + +Response `Withdraw Username (BNB) with invalid Username` +```json +{ + "success": 1, + "error" : "Username is not found!" + "error_code": "" +} +``` + +Response `Withdraw Username (AAVE) 0 Coin` +```json +{ + "success": 1, + "error" : "Can't make withdrawal with amount 0, input a larger withdraw_amount value" + "error_code": "" +} +``` + +Response `Withdraw Username (AAVE) > Maksimum Coin per Day` +```json +{ + "success": 1, + "error" : "Exceeded today's limit. Remain limit: 217.35817575 AAVE. To increase the limit, please contact customer service." +} +``` + +Callback Parameter Sent to Client + +|Parameter|Description| +|-|-| +|request_id|request_id from your request| +|withdraw_currency|currency from your request| +|withdraw_address|| +|withdraw_amount|withdraw_amount from your request| +|withdraw_memo|withdraw_memo from your request (if any)| +|withdraw_username|username withdraw from your request| +|requester_ip|requester_ip of the request| +|request_date|time the request submitted | + #### List Downline Endpoints This method is for list all downline in current user