-
Notifications
You must be signed in to change notification settings - Fork 13
Rest API
Here's an example of authentification method. It returns your JWT token.
Request:
curl --request POST \
--url http://test.multy.io/auth \
--header 'content-type: application/json' \
--data '{
"userID": "sample",
"deviceID": "sample",
"deviceType": 1,
"pushToken": "no",
"appversion": "1"
}'Response:
{
"expire": "2018-06-29T14:05:46+02:00",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw"
}
It returns server configuration.
Request:
curl --request GET \
--url http://localhost:6778/api/v1/wallets/transactions/60/4/0xb415609520344e82f370f00f55e61cc1e79a66bb \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzU2MjYzODUsImlkIjoiMDBlMmU4OGQyZjgyNzkxOWQ5YzdhYzdiYjlkNTUxZTEwZmE4OGM1YTI2MGE4MzVmNTAxNzQzNjJjNDgxMjFjYWY1Iiwib3JpZ19pYXQiOjE1MzU2MjI3ODV9.nnYyMPI9e09OoidhKq2aHgU9KgbMKKgwHJCsNnOox9Y'Response:
payment request
{
"code": 200,
"history": [
{
"txhash": "0xd45f4c12e21d7e681665045523d6c2c4af3a9b0abaee2a8bc9e31471fdafcb6f",
"from": "0xe684455c0d1320464b9996e6b47d4beb9b2723f9",
"to": "0xc10952ca5d0b2b9b3f288ea90067b38db35af34c",
"txoutamount": "3300000000000000",
"gasprice": 1000000000,
"gaslimit": 124910,
"nonce": 95,
"txstatus": 2,
"blocktime": 1535984318,
"mempooltime": 1535984311,
"blockheight": 2927600,
"confirmations": 7,
"multisig": {
"contract": "0xc10952ca5d0b2b9b3f288ea90067b38db35af34c",
"methodinvoked": "0xc6427474",
"input": "0xc64274740000000000000000000000008c473062eca633f47c4f9a5666f18f435f4bb221000000000000000000000000000000000000000000000000000bb9551fc2400000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"invocationstatus": true,
"index": 4,
"return": "0000000000000000000000000000000000000000000000000000000000000004",
"owners": [
{
"address": "0xfad9edb6094fc4909c6f1b236ca4dd77c1165f53",
"confirmationtx": "0xbc79c43ed3cac2483df790555d6d3d2ac04d4e0111c19bdead698df07d9fce62",
"confirmationStatus": 2,
"confirmationTime": 1535984368,
"seenTime": 1535984368
},
{
"address": "0xe684455c0d1320464b9996e6b47d4beb9b2723f9",
"confirmationtx": "0xd45f4c12e21d7e681665045523d6c2c4af3a9b0abaee2a8bc9e31471fdafcb6f",
"confirmationStatus": 2,
"confirmationTime": 1535984311,
"seenTime": 1535984311
}
],
"confirmed": true
},
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.00013750599574483398,
"eth_btc": 0.03974299877882004,
"eth_usd": 289.1300048828125,
"eth_eur": 0,
"btc_usd": 7272.41015625
},
"timestamp": 1535984303,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00015943852726134122,
"usd_btc": 0.00013757353601067914,
"eth_btc": 0.039719998836517334,
"eth_usd": 289.0199890136719,
"eth_eur": 248.91000366210938,
"btc_usd": 7268.83984375
},
"timestamp": 1535984303,
"stock_exchange": "Gdax"
}
]
}
],
"message": "OK"
}
It returns server configuration.
Request:
curl --request GET \
--url http://test.multy.io/server/config \
--header 'content-type: application/json'Response:
{
"android": {
"hard": 7,
"soft": 7
},
"api": "0.01",
"donate": [
{
"FeatureCode": 10000,
"DonationAddress": "1FPv9f8EGRDNod7mSvJnUFonUioA3Pw5ng"
},
...
{
"FeatureCode": 20409,
"DonationAddress": "1KbRaapwNnTJMZcpbTQfb7xJnymKFJDyC1"
}
],
"ios": {
"hard": 29,
"soft": 29
},
"servertime": 1530269261,
"stockexchanges": {
"gdax": [
"eur_btc",
"usd_btc",
"eth_btc",
"eth_usd",
"eth_eur",
"btc_usd"
],
"poloniex": [
"usd_btc",
"eth_btc",
"eth_usd",
"btc_usd"
]
},
"version": {
"branch": "release_1.1",
"commit": "161a198",
"build_time": "2018-06-22T15:57:34+0300",
"tag": ""
}
}
It returns donation information.
Request:
curl --request GET \
--url http://test.multy.io/server/config \
--header 'content-type: application/json'Response:
{
"code": 200,
"donations": [
{
"id": 10000,
"address": "1FPv9f8EGRDNod7mSvJnUFonUioA3Pw5ng",
"amount": 0,
"status": 1
},
...
{
"id": 20409,
"address": "1KbRaapwNnTJMZcpbTQfb7xJnymKFJDyC1",
"amount": 0,
"status": 1
}
],
"message": "OK"
}
This method adds new wallet and returns wheter it created or not.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/wallet \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw' \
--header 'content-type: application/json' \
--data '{
"currencyID": 0,
"networkID": 0,
"address": "sample",
"addressIndex": 0,
"walletIndex": 0,
"walletName": "kek"
}'
# create multisig
--data '{
"currencyID": 60,
"networkID": 4,
"address": "sample",
"addressIndex": 0,
"walletIndex": 0,
"walletName": "kek",
"multisig": {
"isMultisig": true,
"signaturesRequired": 3,
"ownersCount": 4,
"inviteCode": "kek-string"
}
}'Response for wallet :
{
"code": 200,
"message": "OK"
}
Response for multisig :
{
"code": 200,
"message": {
"currencyid": 60,
"networkid": 4,
"confirmations": 3,
"walletName": "kek1",
"factoryAddress": "",
"contractAddress": "",
"txOfCreation": "",
"lastActionTime": 1532533997,
"dateOfCreation": 1532533997,
"owners": [
{
"userid": "00e2e88d2f827919d9c7ac7bb9d551e10fa88c5a260a835f50174362c48121caf5",
"address": "0x0",
"associated": true,
"creator": true,
"walletIndex": 0,
"addressIndex": 0
}
],
"deployStatus": 1,
"status": "ok",
"inviteCode": "kek-string1",
"ownersCount": 4
},
"time": 1532533997
}
Import Multisig
{
"currencyID": 60,
"networkID": 4,
"address": "0xfad9edb6094fc4909c6f1b236ca4dd77c1165f53",
"addressIndex": 0,
"walletIndex": 0,
"walletName": "imp ms",
"isImported": true,
"multisig": {
"isMultisig": true,
"signaturesRequired": 2,
"ownersCount": 2,
"inviteCode": "",
"isImported": true,
"contractAddress": "0x39a7873d3827ee26f222E47eb283BF3b7d60e377"
}
}
This method accepts custom 3 parameters :
/:currencyid/:networkid/:walletindex or /:currencyid/:networkid/:multisigaddress. This method deletes wallet and returns wheter it deleted or not. Wallet only can be deleted if its balance equals 0.
Request:
curl --request DELETE \
--url http://test.multy.io/api/v1/wallet/0/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw''Response:
{
"code": 200,
"message": "OK"
}
This method adds new address for wallet that's sent in request. Work only for BTC wallets
Request:
curl --request POST \
--url http://test.multy.io/api/v1/address \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw' \
--header 'content-type: application/json' \
--data '{
"walletIndex": 0,
"address": "sample",
"addressIndex": 0,
"currencyID": 0
}'Response:
{
"code": 200,
"message": "OK"
}
This method accepts 2 parameters /:currencyid/:networkid. It returns fee rates in sat/byte.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/transaction/feerate/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzQ3ODEsImlkIjoiYWxleCIsIm9yaWdfaWF0IjoxNTMwMjcxMTgxfQ.5xuNbsYt_mge-OWYkTzaUApOx4DLQDVqJG_ssmSAk2I'Response:
{
"code": 200,
"message": "OK",
"speeds": {
"VerySlow": 2,
"Slow": 2,
"Medium": 3,
"Fast": 5,
"VeryFast": 10
}
}
This method accepts 3 parameters /:currencyid/:networkid/:addr. It returns all spendable outputs of selected address.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/outputs/spendable/0/0/n34J7cyue3NjttDeCdAn7XcPnVKNb2CxAg \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjI2NjMzNDgsImlkIjoiZ0JvVkhtV2FmOXg3RVdneXNFSGYydG9laExpOHpmQjF0Yk5Edzg0dDNhS1hLd3ppVyIsIm9yaWdfaWF0IjoxNTIyNjU5NzQ4fQ.AqKEtMS4J4FNmOy9XKEIOrmXpx6ZJ6MjrSuGCo2x64A'Response:
{
"code": 200,
"message": "OK",
"outs": [
{
"txid": "4745ad96ec7fe551f693b63982764bc284afba077f19180c64efd757a7658786",
"txoutid": 0,
"txoutamount": 449218,
"txoutscript": "76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
},
{
"txid": "647f606017217d781c34fc0b98f85846c9eade1b315b28ad3ebe781df427e8f8",
"txoutid": 0,
"txoutamount": 112304,
"txoutscript": "76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
}
]
}
It sends tx and returns TxID.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/transaction/send \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjE1NjA4MzUsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMTU1NzIzNX0.zypYYz2tC5panICY_0fAxiKIyhFj0VtKn1vEMiNUdHg' \
--header 'content-type: application/json' \
--data '{
"currencyid": 0,
"networkid":0,
"payload": {
"address": "n4bveXeaGsfkeU6bWEEiHNTMSBzG4PtN3v",
"addressindex": 1,
"walletindex": 1,
"transaction": "kek",
"ishd": false
}
}'Response:
{
"code": 200,
"message": "sent"
"txid":"76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
}
It return server configuration.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/wallets/verbose \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjIyNTgwOTcsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMjI1NDQ5N30.S2HR8ZSpYFxFfI-KLO_Y0yQrfTW9rv3WmtdBniK1k4w'Response:
{
"code": 200,
"message": "OK",
"topindexes": [
{
"currencyid": 0,
"networkid": 0,
"topindex": 3
},
{
"currencyid": 60,
"networkid": 0,
"topindex": 1
}
],
"wallets": [
{
"currencyid": 60,
"networkid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1234553,
"dateofcreation": 12312312,
"nonce": 1,
"balance": 123456789123456780,
"pending": "true",
"addresses": [
{
"lastActionTime": 1517320476,
"address": "0xMiGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 123456789012345680
}
]
},
{
"currencyid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517320476,
"addresses": [
{
"lastActionTime": 1517320476,
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 130000000,
"spendableoutputs": [
{
"txid": "01d47c5995f9f0ea5f9f8e2a99be2c5c0f0ab7d18af899261ac136059b33e09d",
"txoutid": 0,
"txoutamount": 130000000,
"txoutscript": "76a9141e287510abb23911b17dcf0a55e2aa84966231b988ac",
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 0,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.00009417854283537195,
"eth_btc": 0.10689699649810791,
"eth_usd": 1135.949951171875,
"eth_eur": 0,
"btc_usd": 10618.1298828125
},
"timestamp": 1517320472,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011664759372189893,
"usd_btc": 0.00009510187277319754,
"eth_btc": 0.10696999728679657,
"eth_usd": 1125,
"eth_eur": 913.8499755859375,
"btc_usd": 10515.0400390625
},
"timestamp": 1517320472,
"stock_exchange": "Gdax"
}
]
}
]
}
]
},
{
"currencyid": 0,
"walletindex": 1,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517322474,
"addresses": [
{
"lastActionTime": 1517322474,
"address": "mnFuUUTBjrYS4SaAYpMxqQMKhu1E7fTgR6",
"addressindex": 0,
"amount": 4978940,
"spendableoutputs": [
{
"txid": "ad94a40e1989303b62e613ab67a301b5cfb0eb5b988febf6b5542973c89e01c3",
"txoutid": 0,
"txoutamount": 4978940,
"txoutscript": "76a91449f04968d246a0728af15972c5524c46623f6c9988ac",
"address": "mnFuUUTBjrYS4SaAYpMxqQMKhu1E7fTgR6",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 1,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.0000943649908832729,
"eth_btc": 0.10753200203180313,
"eth_usd": 1138.989990234375,
"eth_eur": 0,
"btc_usd": 10597.150390625
},
"timestamp": 1517322473,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011651888453649891,
"usd_btc": 0.00009501187648456056,
"eth_btc": 0.10739000141620636,
"eth_usd": 1127.5,
"eth_eur": 917.8900146484375,
"btc_usd": 10525
},
"timestamp": 1517322473,
"stock_exchange": "Gdax"
}
]
}
]
},
{
"lastActionTime": 1517323545,
"address": "mpcoJoFaLg4StZEap3rfP3j9c2vHFyMdxh",
"addressindex": 1,
"amount": 0,
"spendableoutputs": []
},
{
"lastActionTime": 1517324057,
"address": "mtB3R4yyk6A6hzvXJ57xKXzk1M3TcXCJJz",
"addressindex": 2,
"amount": 0,
"spendableoutputs": []
}
]
},
{
"currencyid": 0,
"walletindex": 2,
"walletname": "kek",
"lastactiontime": 1517322480,
"dateofcreation": 1517322480,
"addresses": [
{
"lastActionTime": 1517322480,
"address": "miiu7vfVGHF273MwJYyu4VEsvqPn7BhYsx",
"addressindex": 0,
"amount": 0,
"spendableoutputs": []
}
]
}
]
}
This method accepts 3 parameters /:walletindex/verbose/:currencyid/:networkid
or /:invitecode/verbose/:currencyid/:networkid. It returns all the data of wallet.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/0/verbose/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjIyNTgwOTcsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMjI1NDQ5N30.S2HR8ZSpYFxFfI-KLO_Y0yQrfTW9rv3WmtdBniK1k4w'Response:
Bitcoin wallet:
{
"code": 200,
"message": "OK",
"wallet": {
"currencyid": 0,
"walletindex": 0,
"networkid": 0,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517320476,
"addresses": [
{
"lastActionTime": 1517320476,
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 130000000,
"spendableoutputs": [
{
"txid": "01d47c5995f9f0ea5f9f8e2a99be2c5c0f0ab7d18af899261ac136059b33e09d",
"txoutid": 0,
"txoutamount": 130000000,
"txoutscript": "76a9141e287510abb23911b17dcf0a55e2aa84966231b988ac",
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 0,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.00009417854283537195,
"eth_btc": 0.10689699649810791,
"eth_usd": 1135.949951171875,
"eth_eur": 0,
"btc_usd": 10618.1298828125
},
"timestamp": 1517320472,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011664759372189893,
"usd_btc": 0.00009510187277319754,
"eth_btc": 0.10696999728679657,
"eth_usd": 1125,
"eth_eur": 913.8499755859375,
"btc_usd": 10515.0400390625
},
"timestamp": 1517320472,
"stock_exchange": "Gdax"
}
]
}
]
}
]
}
}
Ethereum wallet:
{
"code": 200,
"message": "OK",
"wallet": {
"currencyid": 60,
"networkid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1234553,
"dateofcreation": 12312312,
"nonce": 1,
"balance": 123456789123456780,
"pending": "true",
"addresses": [
{
"lastActionTime": 1517320476,
"address": "0xMiGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 123456789012345680
}
]
}
}
Ethereum multisig:
{
"code": 200,
"message": "OK",
"wallet": [
{
"currencyid": 60,
"networkid": 4,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1530951267,
"dateofcreation": 1530951267,
"nonce": 1,
"pendingbalance": "0",
"balance": "320000000000000000",
"addresses": [
{
"lastactiontime": 1530951267,
"address": "0xb8fbca57279d3958ff41116d4df8ebc59e10e377",
"addressindex": 0,
"amount": "320000000000000000",
"nonce": 1
}
],
"pending": false,
"multisig": {
"owners": [
{
"UserID": "009f7a685960f1a8ffde85cd2c004360581aff0d97a62342c2e97c7b1e15df3fc3",
"Address": "0xfad9edb6094fc4909c6f1b236ca4dd77c1165f53",
"Associated": true,
"WalletIndex": 0,
"AddressIndex": 0
},
{
"UserID": "",
"Address": "0x8c473062eca633f47c4f9a5666f18f435f4bb221",
"Associated": false,
"WalletIndex": 0,
"AddressIndex": 0
}
],
"Confirmations": 2,
"isdeployed": true,
"factoryaddress": "0x116ffa11dd8829524767f561da5d33d3d170e17d",
"txofcreation": "0x7ab930d9fb29e272436600b86c94392705b979c8b2944eb28597a5e5d9111e3a"
}
}
]
}
Deploy statuses :
MultisigStatusWaitingForJoin = 1
MultisigStatusAllJoined = 2
MultisigStatusDeployPending = 3
MultisigStatusRejected = 4
MultisigStatusDeployed = 5
This method rename selected wallet.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/wallet/name \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjMzNTQxODEsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMzM1MDU4MX0.bmez0kNzvS9dMWOS2I1P9pCPoZ4_msDK7R8xpjE0z6M' \
--header 'content-type: application/json' \
--data '{
"walletname": "kek",
"currencyID": 0,
"walletIndex": 0,
"networkId": 0
}'
or
#for multisig
--data '{
"walletname": "kek",
"currencyID": 0,
"address": "0xAddress"
}'Response:
{
"code": 200,
"message": "OK"
}
Here's an example of authentification method. It returns your JWT token.
Request:
curl --request POST \
--url http://test.multy.io/auth \
--header 'content-type: application/json' \
--data '{
"userID": "sample",
"deviceID": "sample",
"deviceType": 1,
"pushToken": "no",
"appversion": "1"
}'Response:
{
"expire": "2018-06-29T14:05:46+02:00",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw"
}
It returns server configuration.
Request:
curl --request GET \
--url http://test.multy.io/server/config \
--header 'content-type: application/json'Response:
{
"android": {
"hard": 7,
"soft": 7
},
"api": "0.01",
"donate": [
{
"FeatureCode": 10000,
"DonationAddress": "1FPv9f8EGRDNod7mSvJnUFonUioA3Pw5ng"
},
...
{
"FeatureCode": 20409,
"DonationAddress": "1KbRaapwNnTJMZcpbTQfb7xJnymKFJDyC1"
}
],
"ios": {
"hard": 29,
"soft": 29
},
"servertime": 1530269261,
"stockexchanges": {
"gdax": [
"eur_btc",
"usd_btc",
"eth_btc",
"eth_usd",
"eth_eur",
"btc_usd"
],
"poloniex": [
"usd_btc",
"eth_btc",
"eth_usd",
"btc_usd"
]
},
"version": {
"branch": "release_1.1",
"commit": "161a198",
"build_time": "2018-06-22T15:57:34+0300",
"tag": ""
}
}
It returns donation information.
Request:
curl --request GET \
--url http://test.multy.io/server/config \
--header 'content-type: application/json'Response:
{
"code": 200,
"donations": [
{
"id": 10000,
"address": "1FPv9f8EGRDNod7mSvJnUFonUioA3Pw5ng",
"amount": 0,
"status": 1
},
...
{
"id": 20409,
"address": "1KbRaapwNnTJMZcpbTQfb7xJnymKFJDyC1",
"amount": 0,
"status": 1
}
],
"message": "OK"
}
This method adds new wallet and returns wheter it created or not.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/wallet \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw' \
--header 'content-type: application/json' \
--data '{
"currencyID": 0,
"networkID": 0,
"address": "sample",
"addressIndex": 0,
"walletIndex": 0,
"walletName": "kek"
}'Response:
{
"code": 200,
"message": "OK"
}
This method accepts 3 parameters /:currencyid/:networkid/:walletindex. This method deletes wallet and returns wheter it deleted or not. Wallet can be deleted if its balance equals 0.
Request:
curl --request DELETE \
--url http://test.multy.io/api/v1/wallet/0/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw' \
--header 'content-type: application/json' \
--data '{
"currencyID": 0,
"networkID": 0,
"addressIndex": 0,
"walletIndex": 0,
}'
# or for multisig
--data '{
"currencyID": 0,
"networkID": 0,
"address": "0xAddress",
}'Response:
{
"code": 200,
"message": "OK"
}
This method adds new address for wallet that's sent in request.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/address \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzM5NDYsImlkIjoic2FtcGxlIiwib3JpZ19pYXQiOjE1MzAyNzAzNDZ9.YJbzQzHhMxRX64Z3w9QXqG0QHgZT2KORROS-pobQGyw' \
--header 'content-type: application/json' \
--data '{
"walletIndex": 0,
"address": "sample",
"addressIndex": 0,
"currencyID": 0
}'Response:
{
"code": 200,
"message": "OK"
}
This method accepts 2 parameters /:currencyid/:networkid. It returns fee rates in sat/byte.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/transaction/feerate/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzAyNzQ3ODEsImlkIjoiYWxleCIsIm9yaWdfaWF0IjoxNTMwMjcxMTgxfQ.5xuNbsYt_mge-OWYkTzaUApOx4DLQDVqJG_ssmSAk2I'Response:
{
"code": 200,
"message": "OK",
"speeds": {
"VerySlow": 2,
"Slow": 2,
"Medium": 3,
"Fast": 5,
"VeryFast": 10
}
}
This method accepts 3 parameters /:currencyid/:networkid/:addr. It returns all spendable outputs of selected address.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/outputs/spendable/0/0/n34J7cyue3NjttDeCdAn7XcPnVKNb2CxAg \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjI2NjMzNDgsImlkIjoiZ0JvVkhtV2FmOXg3RVdneXNFSGYydG9laExpOHpmQjF0Yk5Edzg0dDNhS1hLd3ppVyIsIm9yaWdfaWF0IjoxNTIyNjU5NzQ4fQ.AqKEtMS4J4FNmOy9XKEIOrmXpx6ZJ6MjrSuGCo2x64A'Response:
{
"code": 200,
"message": "OK",
"outs": [
{
"txid": "4745ad96ec7fe551f693b63982764bc284afba077f19180c64efd757a7658786",
"txoutid": 0,
"txoutamount": 449218,
"txoutscript": "76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
},
{
"txid": "647f606017217d781c34fc0b98f85846c9eade1b315b28ad3ebe781df427e8f8",
"txoutid": 0,
"txoutamount": 112304,
"txoutscript": "76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
}
]
}
It sends tx and returns TxID.
Request:
curl --request POST \
--url http://test.multy.io/api/v1/transaction/send \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjE1NjA4MzUsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMTU1NzIzNX0.zypYYz2tC5panICY_0fAxiKIyhFj0VtKn1vEMiNUdHg' \
--header 'content-type: application/json' \
--data '{
"currencyid": 0,
"networkid":0,
"payload": {
"address": "n4bveXeaGsfkeU6bWEEiHNTMSBzG4PtN3v",
"addressindex": 1,
"walletindex": 1,
"transaction": "kek",
"ishd": false
}
}'Response:
{
"code": 200,
"message": "sent"
"txid":"76a914ec4814cecf2cc4d2b87d02456928a26ccde9b66788ac"
}
It return server configuration.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/wallets/verbose \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjIyNTgwOTcsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMjI1NDQ5N30.S2HR8ZSpYFxFfI-KLO_Y0yQrfTW9rv3WmtdBniK1k4w'Response:
{
"code": 200,
"message": "OK",
"topindexes": [
{
"currencyid": 0,
"networkid": 0,
"topindex": 3
},
{
"currencyid": 60,
"networkid": 0,
"topindex": 1
}
],
"wallets": [
{
"currencyid": 60,
"networkid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1234553,
"dateofcreation": 12312312,
"nonce": 1,
"balance": 123456789123456780,
"pending": "true",
"addresses": [
{
"lastActionTime": 1517320476,
"address": "0xMiGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 123456789012345680
}
]
},
{
"currencyid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517320476,
"addresses": [
{
"lastActionTime": 1517320476,
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 130000000,
"spendableoutputs": [
{
"txid": "01d47c5995f9f0ea5f9f8e2a99be2c5c0f0ab7d18af899261ac136059b33e09d",
"txoutid": 0,
"txoutamount": 130000000,
"txoutscript": "76a9141e287510abb23911b17dcf0a55e2aa84966231b988ac",
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 0,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.00009417854283537195,
"eth_btc": 0.10689699649810791,
"eth_usd": 1135.949951171875,
"eth_eur": 0,
"btc_usd": 10618.1298828125
},
"timestamp": 1517320472,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011664759372189893,
"usd_btc": 0.00009510187277319754,
"eth_btc": 0.10696999728679657,
"eth_usd": 1125,
"eth_eur": 913.8499755859375,
"btc_usd": 10515.0400390625
},
"timestamp": 1517320472,
"stock_exchange": "Gdax"
}
]
}
]
}
]
},
{
"currencyid": 0,
"walletindex": 1,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517322474,
"addresses": [
{
"lastActionTime": 1517322474,
"address": "mnFuUUTBjrYS4SaAYpMxqQMKhu1E7fTgR6",
"addressindex": 0,
"amount": 4978940,
"spendableoutputs": [
{
"txid": "ad94a40e1989303b62e613ab67a301b5cfb0eb5b988febf6b5542973c89e01c3",
"txoutid": 0,
"txoutamount": 4978940,
"txoutscript": "76a91449f04968d246a0728af15972c5524c46623f6c9988ac",
"address": "mnFuUUTBjrYS4SaAYpMxqQMKhu1E7fTgR6",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 1,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.0000943649908832729,
"eth_btc": 0.10753200203180313,
"eth_usd": 1138.989990234375,
"eth_eur": 0,
"btc_usd": 10597.150390625
},
"timestamp": 1517322473,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011651888453649891,
"usd_btc": 0.00009501187648456056,
"eth_btc": 0.10739000141620636,
"eth_usd": 1127.5,
"eth_eur": 917.8900146484375,
"btc_usd": 10525
},
"timestamp": 1517322473,
"stock_exchange": "Gdax"
}
]
}
]
},
{
"lastActionTime": 1517323545,
"address": "mpcoJoFaLg4StZEap3rfP3j9c2vHFyMdxh",
"addressindex": 1,
"amount": 0,
"spendableoutputs": []
},
{
"lastActionTime": 1517324057,
"address": "mtB3R4yyk6A6hzvXJ57xKXzk1M3TcXCJJz",
"addressindex": 2,
"amount": 0,
"spendableoutputs": []
}
]
},
{
"currencyid": 60,
"networkid": 4,
"walletindex": 0,
"walletname": "й",
"lastactiontime": 1532424090,
"dateofcreation": 1532423777151432600,
"nonce": 3,
"pendingbalance": "10000000000000000",
"balance": "20000000000000000",
"addresses": [
{
"lastactiontime": 1532424090,
"address": "0xca7621dacec053e164005234695b2193a1f8b71b",
"addressindex": 0,
"amount": "20000000000000000"
}
],
"in": 0,
"out": 1,
"pending": false
}
]
}
This method accepts 3 parameters /:walletindex/verbose/:currencyid/:networkid. It returns all the data of wallet.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/0/verbose/0/0 \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjIyNTgwOTcsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMjI1NDQ5N30.S2HR8ZSpYFxFfI-KLO_Y0yQrfTW9rv3WmtdBniK1k4w'Response:
Bitcoin wallet:
{
"code": 200,
"message": "OK",
"wallet": {
"currencyid": 0,
"walletindex": 0,
"networkid": 0,
"walletname": "kek",
"lastactiontime": 1517322474,
"dateofcreation": 1517320476,
"addresses": [
{
"lastActionTime": 1517320476,
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 130000000,
"spendableoutputs": [
{
"txid": "01d47c5995f9f0ea5f9f8e2a99be2c5c0f0ab7d18af899261ac136059b33e09d",
"txoutid": 0,
"txoutamount": 130000000,
"txoutscript": "76a9141e287510abb23911b17dcf0a55e2aa84966231b988ac",
"address": "miGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"userid": "2bPz7hrZ1wAMUASVQMq1iMPTA5tvqjrsVcf4rGpSWyJ619YYzG",
"walletindex": 0,
"addressindex": 0,
"txstatus": 2,
"stockexchangerate": [
{
"exchanges": {
"eur_btc": 0,
"usd_btc": 0.00009417854283537195,
"eth_btc": 0.10689699649810791,
"eth_usd": 1135.949951171875,
"eth_eur": 0,
"btc_usd": 10618.1298828125
},
"timestamp": 1517320472,
"stock_exchange": "Poloniex"
},
{
"exchanges": {
"eur_btc": 0.00011664759372189893,
"usd_btc": 0.00009510187277319754,
"eth_btc": 0.10696999728679657,
"eth_usd": 1125,
"eth_eur": 913.8499755859375,
"btc_usd": 10515.0400390625
},
"timestamp": 1517320472,
"stock_exchange": "Gdax"
}
]
}
]
}
]
}
}
Ethereum wallet:
{
"code": 200,
"message": "OK",
"wallet": {
"currencyid": 60,
"networkid": 0,
"walletindex": 0,
"walletname": "kek",
"lastactiontime": 1234553,
"dateofcreation": 12312312,
"nonce": 1,
"balance": 123456789123456780,
"pending": "true",
"addresses": [
{
"lastActionTime": 1517320476,
"address": "0xMiGR2q7nSFawjifK5vhixSAeHoH2Do5yKu",
"addressindex": 0,
"amount": 123456789012345680
}
],
"in": 0,
"out": 1,
}
}
Ethereum multisig:
## Change wallet name
This method rename selected wallet.
`Request:`
```bash
curl --request POST \
--url http://test.multy.io/api/v1/wallet/name \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjMzNTQxODEsImlkIjoiamtiZ20iLCJvcmlnX2lhdCI6MTUyMzM1MDU4MX0.bmez0kNzvS9dMWOS2I1P9pCPoZ4_msDK7R8xpjE0z6M' \
--header 'content-type: application/json' \
--data '{
"walletname": "kek",
"currencyID": 0,
"walletIndex": 0,
"networkId": 0
}'
Response:
{
"code": 200,
"message": "OK"
}
This method accepts 3 parameters /api/v1/chain/:currencyid/:networkid/info. It returns all the data of wallet.
Request:
curl --request GET \
--url http://test.multy.io/api/v1/chain/194/1/info \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzMyOTM2MTYsImlkIjoiMDA3NGViMDU3YTZiMDA5NjhhMTk3MWY3YjQyZDkwYTc3NjA0MjYwYTg3Njk3YzhhMWYyOWExMmY1YzlkNDRiMDdhIiwib3JpZ19pYXQiOjE1MzMyOTAwMTZ9.Yo-aVRZmjxByTzFCSI8nlHep5pyRUvdxENGv77WyWHk' \
--header 'content-type: application/json'Response:
Bitcoin wallet:
{
"code": 200,
"message": "OK,
"state": {
"chainTime": "2018-08-03T09:55:21Z",
"refBlockPrefix": 174407561,
"blockNumber": 8050818
}
}get list of accounts by public key
{
"code": 200,
"account_names": [
"kek1",
"kek2"
]
}{
"code": 500,
"message": "something went wrong :("
}Get ram price in eos
{
"code": 200,
"message": "OK",
"price": 213.2344
}Check existence of account get public owner key
{
"code": 200,
"message": "OK",
"account": {
"exist": true,
"public_key": "EOSTOPSECRETKEY"
}
}Create account ,add to wallet
{
"name": "vovapi",
"active_key": "EOSPUBLICKEY",
"owner_key": "EOSPIBLICKEY",
"ram": 123,
"cpu": 123.4567,
"net": 123.4567,
"currencyID": 194,
"networkID": 1,
"address": "vovapi",
"addressIndex": 1337,
"walletIndex": 1337,
"walletName": "kek"
}
!!NOT WORKING ON IMPORTED WALLETS!!
Create account ,add to wallet
{
}Returns supported currencies in exchanger, any pair combination can be exchanged
{
"code": 200,
"message": "OK",
"currencies": ["eth", "btc", "xmr", "sc"]
}Get amount you want to exchange and returns amount you will be credited
{
"from": "eth",
"to": "btc",
"amount": 1.5
}{
"code": 200,
"message": "OK",
"amount": 0.2
}Get amount you want to exchange and returns amount you will be credited
{
"from": "eth",
"to": "btc",
}{
"code": 200,
"message": "OK",
"amount": "0.2"
}Create exchange transaction
{
"from": "eth",
"to": "btc",
"amount": 1.5,
"address": "0xtargetCurrencyAddress"
}{
"code": 200,
"message": "OK",
"transactionId": "qo83eunzueh3j5e",
"payinAddress": "0xpayinAddress", // address to send
"payoutAddress": "0xpayoutAddress"
}