/wallet/exchangecreate REST API Endpoint
Please note that the successful execution, signing, and broadcast of this API call will deduct 1024 TRX from the user's account.
身體參數
owner_address
字串
必填
載入中...
first_token_id
字串
必填
載入中...
first_token_balance
整數
必填
載入中...
second_token_id
整數
必填
載入中...
second_token_balance
整數
必填
載入中...
visible
布林值
載入中...
permission_id
整數
載入中...
退貨
結果
載入中...
訊息
載入中...
txID
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"owner_address": "OWNER_ADDRESS",7"first_token_id": "FIRST_TOKEN_ID",8"first_token_balance": 100,9"second_token_id": "SECOND_TOKEN_ID",10"second_token_balance": 100,11"visible": true12}13'141516
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"owner_address": "OWNER_ADDRESS",7"first_token_id": "FIRST_TOKEN_ID",8"first_token_balance": 100,9"second_token_id": "SECOND_TOKEN_ID",10"second_token_balance": 100,11"visible": true12}13'141516
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate';23const data = {4owner_address: 'OWNER_ADDRESS',5first_token_id: 'FIRST_TOKEN_ID',6first_token_balance: 100,7second_token_id: 'SECOND_TOKEN_ID',8second_token_balance: 100,9visible: true10};1112取得(url, {13方法: 'POST',14headers: {15'accept': 'application/json',16'content-type': 'application/json'17},18body: JSON.stringify(data)19})20.接著(回應 => response.json())21.then(data => console.log(data))22.catch(error => console.error(error));23
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate';23const data = {4owner_address: 'OWNER_ADDRESS',5first_token_id: 'FIRST_TOKEN_ID',6first_token_balance: 100,7second_token_id: 'SECOND_TOKEN_ID',8second_token_balance: 100,9visible: true10};1112取得(url, {13方法: 'POST',14headers: {15'accept': 'application/json',16'content-type': 'application/json'17},18body: JSON.stringify(data)19})20.接著(回應 => response.json())21.then(data => console.log(data))22.catch(error => console.error(error));23
1匯入 請求23url = "https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate"45資料 = {6'owner_address': 'OWNER_ADDRESS',7'first_token_id': 'FIRST_TOKEN_ID',8'first_token_balance': 100,9'second_token_id': 'SECOND_TOKEN_ID',10'second_token_balance': 100,11'visible': True12}1314標題 = {15'accept': 'application/json',16'content-type': 'application/json'17}1819response = requests.post(url, json=data, headers=headers)20print(response.json())21
1匯入 請求23url = "https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate"45資料 = {6'owner_address': 'OWNER_ADDRESS',7'first_token_id': 'FIRST_TOKEN_ID',8'first_token_balance': 100,9'second_token_id': 'SECOND_TOKEN_ID',10'second_token_balance': 100,11'visible': True12}1314標題 = {15'accept': 'application/json',16'content-type': 'application/json'17}1819response = requests.post(url, json=data, headers=headers)20print(response.json())21
1需要 "uri"2需要 "net/http"3require 'json'45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate")67資料 = {8'owner_address' => 'OWNER_ADDRESS',9'first_token_id' => 'FIRST_TOKEN_ID',10'first_token_balance' => 100,11'second_token_id' => 'SECOND_TOKEN_ID',12'second_token_balance' => 100,13'visible' => true14}1516標題 = {17'accept' => 'application/json',18'content-type' => 'application/json'19}2021http = Net::HTTP.new(url.host, url.port)22http.use_ssl = true2324request = Net::HTTP::Post.new(url.path, headers)25請求。正文 = data.to_json2627回應 = http.請求(請求)28將回應。正文2930
1需要 "uri"2需要 "net/http"3require 'json'45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate")67資料 = {8'owner_address' => 'OWNER_ADDRESS',9'first_token_id' => 'FIRST_TOKEN_ID',10'first_token_balance' => 100,11'second_token_id' => 'SECOND_TOKEN_ID',12'second_token_balance' => 100,13'visible' => true14}1516標題 = {17'accept' => 'application/json',18'content-type' => 'application/json'19}2021http = Net::HTTP.new(url.host, url.port)22http.use_ssl = true2324request = Net::HTTP::Post.new(url.path, headers)25請求。正文 = data.to_json2627回應 = http.請求(請求)28將回應。正文2930