cURL
curl --request POST \
--url https://apidev.nusd.me/nps/withdraw/onchain \
--header 'BIZ-API-KEY: <api-key>' \
--header 'Biz-Api-Nonce: <api-key>' \
--header 'Biz-Api-Signature: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "d8551182-0aee-4346-929e-05c99081352a",
"wallet_id": "e9167870-e18b-4e82-8b87-92ec7ede8e45",
"to": "0xdc2e6b357766aa4b66f41dc29598379ce7d61d46",
"amount": "10.08",
"chain_id": "BASE_ETH",
"token_id": "BASE_USDT"
}
'import requests
url = "https://apidev.nusd.me/nps/withdraw/onchain"
payload = {
"request_id": "d8551182-0aee-4346-929e-05c99081352a",
"wallet_id": "e9167870-e18b-4e82-8b87-92ec7ede8e45",
"to": "0xdc2e6b357766aa4b66f41dc29598379ce7d61d46",
"amount": "10.08",
"chain_id": "BASE_ETH",
"token_id": "BASE_USDT"
}
headers = {
"BIZ-API-KEY": "<api-key>",
"Biz-Api-Nonce": "<api-key>",
"Biz-Api-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'BIZ-API-KEY': '<api-key>',
'Biz-Api-Nonce': '<api-key>',
'Biz-Api-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
request_id: 'd8551182-0aee-4346-929e-05c99081352a',
wallet_id: 'e9167870-e18b-4e82-8b87-92ec7ede8e45',
to: '0xdc2e6b357766aa4b66f41dc29598379ce7d61d46',
amount: '10.08',
chain_id: 'BASE_ETH',
token_id: 'BASE_USDT'
})
};
fetch('https://apidev.nusd.me/nps/withdraw/onchain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apidev.nusd.me/nps/withdraw/onchain"
payload := strings.NewReader("{\n \"request_id\": \"d8551182-0aee-4346-929e-05c99081352a\",\n \"wallet_id\": \"e9167870-e18b-4e82-8b87-92ec7ede8e45\",\n \"to\": \"0xdc2e6b357766aa4b66f41dc29598379ce7d61d46\",\n \"amount\": \"10.08\",\n \"chain_id\": \"BASE_ETH\",\n \"token_id\": \"BASE_USDT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("BIZ-API-KEY", "<api-key>")
req.Header.Add("Biz-Api-Nonce", "<api-key>")
req.Header.Add("Biz-Api-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apidev.nusd.me/nps/withdraw/onchain")
.header("BIZ-API-KEY", "<api-key>")
.header("Biz-Api-Nonce", "<api-key>")
.header("Biz-Api-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"d8551182-0aee-4346-929e-05c99081352a\",\n \"wallet_id\": \"e9167870-e18b-4e82-8b87-92ec7ede8e45\",\n \"to\": \"0xdc2e6b357766aa4b66f41dc29598379ce7d61d46\",\n \"amount\": \"10.08\",\n \"chain_id\": \"BASE_ETH\",\n \"token_id\": \"BASE_USDT\"\n}")
.asString();{
"status": 0,
"data": {
"transaction_id": "28f2505c-55ab-4fc7-8620-152c4045981a",
"request_id": "9bfa5014-2f12-4eb8-b979-3cf8cb947b45"
},
"msg": "<string>"
}{
"status": 0,
"data": {
"transaction_id": "28f2505c-55ab-4fc7-8620-152c4045981a",
"request_id": "9bfa5014-2f12-4eb8-b979-3cf8cb947b45"
},
"msg": "<string>"
}Payout(付款)
链上付款(提币)
把 USDT 付到平台外部的链上钱包地址。资金离开 NUSDpay、在区块链上转账,需要网络手续费、不可撤回。
POST
/
nps
/
withdraw
/
onchain
cURL
curl --request POST \
--url https://apidev.nusd.me/nps/withdraw/onchain \
--header 'BIZ-API-KEY: <api-key>' \
--header 'Biz-Api-Nonce: <api-key>' \
--header 'Biz-Api-Signature: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "d8551182-0aee-4346-929e-05c99081352a",
"wallet_id": "e9167870-e18b-4e82-8b87-92ec7ede8e45",
"to": "0xdc2e6b357766aa4b66f41dc29598379ce7d61d46",
"amount": "10.08",
"chain_id": "BASE_ETH",
"token_id": "BASE_USDT"
}
'import requests
url = "https://apidev.nusd.me/nps/withdraw/onchain"
payload = {
"request_id": "d8551182-0aee-4346-929e-05c99081352a",
"wallet_id": "e9167870-e18b-4e82-8b87-92ec7ede8e45",
"to": "0xdc2e6b357766aa4b66f41dc29598379ce7d61d46",
"amount": "10.08",
"chain_id": "BASE_ETH",
"token_id": "BASE_USDT"
}
headers = {
"BIZ-API-KEY": "<api-key>",
"Biz-Api-Nonce": "<api-key>",
"Biz-Api-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'BIZ-API-KEY': '<api-key>',
'Biz-Api-Nonce': '<api-key>',
'Biz-Api-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
request_id: 'd8551182-0aee-4346-929e-05c99081352a',
wallet_id: 'e9167870-e18b-4e82-8b87-92ec7ede8e45',
to: '0xdc2e6b357766aa4b66f41dc29598379ce7d61d46',
amount: '10.08',
chain_id: 'BASE_ETH',
token_id: 'BASE_USDT'
})
};
fetch('https://apidev.nusd.me/nps/withdraw/onchain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apidev.nusd.me/nps/withdraw/onchain"
payload := strings.NewReader("{\n \"request_id\": \"d8551182-0aee-4346-929e-05c99081352a\",\n \"wallet_id\": \"e9167870-e18b-4e82-8b87-92ec7ede8e45\",\n \"to\": \"0xdc2e6b357766aa4b66f41dc29598379ce7d61d46\",\n \"amount\": \"10.08\",\n \"chain_id\": \"BASE_ETH\",\n \"token_id\": \"BASE_USDT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("BIZ-API-KEY", "<api-key>")
req.Header.Add("Biz-Api-Nonce", "<api-key>")
req.Header.Add("Biz-Api-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apidev.nusd.me/nps/withdraw/onchain")
.header("BIZ-API-KEY", "<api-key>")
.header("Biz-Api-Nonce", "<api-key>")
.header("Biz-Api-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"d8551182-0aee-4346-929e-05c99081352a\",\n \"wallet_id\": \"e9167870-e18b-4e82-8b87-92ec7ede8e45\",\n \"to\": \"0xdc2e6b357766aa4b66f41dc29598379ce7d61d46\",\n \"amount\": \"10.08\",\n \"chain_id\": \"BASE_ETH\",\n \"token_id\": \"BASE_USDT\"\n}")
.asString();{
"status": 0,
"data": {
"transaction_id": "28f2505c-55ab-4fc7-8620-152c4045981a",
"request_id": "9bfa5014-2f12-4eb8-b979-3cf8cb947b45"
},
"msg": "<string>"
}{
"status": 0,
"data": {
"transaction_id": "28f2505c-55ab-4fc7-8620-152c4045981a",
"request_id": "9bfa5014-2f12-4eb8-b979-3cf8cb947b45"
},
"msg": "<string>"
}授权
API Key,请求需在请求头中携带。
时间戳,请求需在请求头中携带。
签名串,请求需在请求头中携带。
请求体
application/json
请求方生成的唯一 id,用于幂等控制:相同 request_id 不会重复创建交易。可使用贵方系统的订单号,并可凭其查询交易。
示例:
"d8551182-0aee-4346-929e-05c99081352a"
提币的钱包id
示例:
"e9167870-e18b-4e82-8b87-92ec7ede8e45"
提币至的地址
示例:
"0xdc2e6b357766aa4b66f41dc29598379ce7d61d46"
提币数量
示例:
"10.08"
币种唯一标识。枚举值可通过币种列表获取;实际充提开放状态与费率以平台设置 /nps/configs 返回为准。
示例:
"BASE_USDT"
手续费承担方,默认为用户承担
- App: 项目方承担
- User: 用户承担
示例:
"App"