/sendBitcoinTransaction
curl --request POST \
--url 'http://1.1.1.1/sendBitcoinTransaction?account_id=1&outputs=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3%2C6000&fee=20&description=Test&specificFromAddress=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"ApprovalRequestStatus": 3,
"CoinType": "BTC",
"Transactions": [
{
"AmountToTransfer": "10000000",
"DestinationAddress": "3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3"
}
]
},
"Meta": {
"AccessToken": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
"Destination": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
"Source": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
"Time": "2021-02-14 09:58:52.320"
}
}'- NOTE - this function can not be called from Swagger, please use sendBitcoinTransactionForSwagger instead.
- return - returns on success transactions array
[{'AmountToTransfer': '600','DestinationAddress': '3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3'}]}
** NOTE: success or failure in this api call does not necessarily means success or failure in the transaction itself
** for example, the transaction may work by the response to the client can be lost in communication (if the internet is down for the client)
** another example is that the transaction was approved here but failed in the signing process
To know the status of the transaction you can access the function getTransactionByToken.
To get the token to send those functions you should call getCurrentToken one action BEFORE sendTransaction
myTokenToStoreInTheDb = user.getCurrentToken()
sendBitcoinTransaction(...)
....
user.getTransactionByToken(myTokenToStoreInTheDb,'BTC')