I am trying to make a request to the Binance API using the universal transfer call that requires 3 params: "asset", "value" and "type". However, when I make the call with the required params I get the following response:
{
code: -1102,
msg: "Mandatory parameter 'type' was not sent, was empty/null, or malformed."
}
I can see that the parameter is being parsed in when I console.log but I still get the error:
[Object: null prototype] {
code: -1102,
msg: "Mandatory parameter 'type' was not sent, was empty/null, or malformed."
}
Here's the futuresTransferAsset() function I'm using the API from here
futuresTransferAsset: async ( asset, amount, type ) => {
let params = Object.assign( { asset, amount, type } );
return promiseRequest( 'v1/futures/transfer', params, { base:sapi, type:'SIGNED', method:'POST' } );
},
Here is the request:
const result = await binance.futuresTransferAsset('USDT', 1.00, 'UMFUTURE_MAIN')
Am I not parsing in the type param correctly?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…