2017-06-21 21 views
0

shapeshift APIを使用してhttps://www.shapeshift.io/sendamountに転記すると、「出力金額または入金金額がありません」というエラーが表示されます。shapeshift.io API:「出力金額または入金金額がありません」

要求JSON文字列: { "returnAddress" : "19z95ce8a1UwV3PCCCBE7AD7hNXENW3gu4", "withdrawal" : "0xFF7c7d21cf668F59A85188126D88106c62056Ec1", "pair" : "btc_eth", "amount" : "1" }

何が悪いですの?

答えて

0

私の場合は、POSTの 'Content-Type'ヘッダーを 'application/json'に設定してこのエラーをクリアしました。

0

PHPの場合、JSON文字列を使用する代わりに、URL文字列を使用してエラーをクリアしました。

var settings = { 
    "async": true, 
    "crossDomain": true, 
    "url": "https://shapeshift.io/sendamount", 
    "method": "POST", 
    "headers": { 
     "Content-Type": "application/x-www-form-urlencoded" 
    }, 
    "data": { 
     "amount": ".002", 
     "pair": "ltc_btc" 
    } 
    } 

    $.ajax(settings).done(function (response) { 
    console.log(response); 
    }); 

のNode.jsまたはJavaScriptの場合

、これは無問題に私のために働きました

関連する問題