For the best viewing experience, please turn your phone to portrait mode.

Lisk API 0.9

Table of Content

Information

All API endpoints are relative to the /api prefix.

All endpoints will return:

  • Success parameter. True or false dependent on success.
  • Error parameter. Provided when response is unsuccessful.

The API is only available after the client has successfully loaded, otherwise all endpoints will return:

{
    "success" : false,
    "error" : "loading"
}

In the case the client is not fully synced all routes may return intermediate/old values.

Each API entry contains an example call to help provide understanding of how to use the call. These examples rely on curl being installed and Lisk running on the localhost on port 8000 (Mainnet). Use this for easy identification of what needs to be changed for the call to function.

Accounts

Get Account Information

Request information about an account.

POST /api/accounts/open

Request

 {
  "secret": "secret key of account"
}

Response

 {
  "success": true,
  "account": {
    "address": "Address of account. String",
    "unconfirmedBalance": "Unconfirmed balance of account. String",
    "balance": "Balance of account. String",
    "publicKey": "Public key of account. Hex",
    "unconfirmedSignature": "If account enabled second signature, but it's still not confirmed. Integer",
    "secondSignature": "If account enabled second signature. Integer",
    "secondPublicKey": "Second public key of account. Hex",
    "multisignatures": "Multisignatures. Array"
    "u_multisignatures": "uMultisignatures. Array"
  }
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>"}' \
http://localhost:8000/api/accounts/open

Get Account Balance

Request the balance of an account.

GET /api/accounts/getBalance?address=<address>

Response

 {
  "success": true,
  "balance": "Balance of account",
  "unconfirmedBalance": "Unconfirmed balance of account"
}

Example

curl -k -X GET http://localhost:8000/api/accounts/getBalance?address=<address>

Get Account Public Key

Get the public key of an account. If the account does not exist the API call will return an error.

GET /api/accounts/getPublicKey?address=address

Response

 {
  "success": true,
  "publicKey": "Public key of account. Hex"
}

Example

curl -k -X GET http://localhost:8000/api/accounts/getPublicKey?address=<address>

Generate Public Key

Returns the public key of the provided secret key.

POST /api/accounts/generatePublicKey

Request

 {
  "secret": "secret key of account"
}

Response

 {
  "success": true,
  "publicKey": "Public key of account. Hex"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>"}' \
http://localhost:8000/api/accounts/generatePublicKey

Get Account Information from Address

Returns account information of an address.

GET /api/accounts?address=address

Response

 {
  "success": true,
  "account": {
    "address": "Address of account. String",
    "unconfirmedBalance": "Unconfirmed balance of account. Integer",
    "balance": "Balance of account. Integer",
    "publicKey": "Public key of account. Hex",
    "unconfirmedSignature": "If account enabled second signature, but it's still not confirmed. Boolean: true or false",
    "secondSignature": "If account enabled second signature. Boolean: true or false",
    "multisignatures": "Array",
    "u_multisignatures": "Array"
  }
}

Example

curl -k -X GET http://localhost:8000/api/accounts?address=<address>

Get Delegates

Returns delegate accounts by address.

GET /api/accounts/delegates?address=address

Response

 {
    "success": true,
    "delegates": [
      "array of delegates object. (see below the delegate object response)"
    ]
}

Example

curl -k -X GET http://localhost:8000/api/accounts/delegates?address=<address>

Vote Delegates

Vote for the selected delegates. Maximum of 33 delegates at once.

PUT /api/accounts/delegates

Request

 {
    "secret" : "Secret key of account",
    "publicKey" : "Public key of sender account, to verify secret passphrase in wallet. Optional, only for UI",
    "secondSecret" : "Secret key from second transaction, required if user uses second signature",
    "delegates" : "Array of string in the following format: ["+DelegatePublicKey"] OR ["-DelegatePublicKey"]. Use + to UPvote, - to DOWNvote"
}

Response

 {  
   "success": true,
   "transaction": {  
      "type": "Type of transaction. Integer",
      "amount": "Amount. Integer",
      "senderPublicKey": "Sender public key. String",
      "requesterPublicKey": "Requester public key. String",
      "timestamp": "Time. Integer",
      "asset":{  
         "votes":[  
            "+VotedPublickKey",
            "-RemovedVotePublicKey"
         ]
      },
      "recipientId": "Recipient address. String",
      "signature": "Signature. String",
      "signSignature": "Sign signature. String",
      "id": "Tx ID. String",
      "fee": "Fee. Integer",
      "senderId": "Sender address. String",
      "relays": "Propagation. Integer",
      "receivedAt": "Time. String"
   }
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","publicKey"="<INSERT PUBLICKEY HERE>","delegates":["<INSERT DELEGATE PUBLICKEY HERE>"]}' \
http://localhost:8000/api/accounts/delegates

Example - With Second Secret

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":["<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>", "<INSERT SECOND SECRET HERE>"],"publicKey"="<INSERT PUBLICKEY HERE>","delegates":["<INSERT DELEGATE PUBLICKEY HERE>","<INSERT DELEGATE PUBLICKEY HERE>"]}' \
http://localhost:8000/api/accounts/delegates

Example - Multiple Votes

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","publicKey"="<INSERT PUBLICKEY HERE>","delegates":["<INSERT DELEGATE PUBLICKEY HERE>","<INSERT DELEGATE PUBLICKEY HERE>"]}' \
http://localhost:8000/api/accounts/delegates

Blocks

Get Blocks

Gets all blocks by provided filter(s).

GET /api/blocks?generatorPublicKey=generatorPublicKey&height=height&previousBlock=previousBlock&totalAmount=totalAmount&totalFee=totalFee&limit=limit&offset=offset&orderBy=orderBy

All parameters joins by OR.

Example
/api/blocks?height=100&totalAmount=10000 looks like: height=100 OR totalAmount=10000

  • totalFee: total fee of block. (Integer)
  • totalAmount: total amount of block. (Integer)
  • previousBlock: previous block of need block. (String)
  • height: height of block. (Integer)
  • generatorPublicKey: generator id of block in hex. (String)
  • limit: limit of blocks to add to response. Default to 20. (Integer)
  • offset: offset to load blocks. (Integer)
  • orderBy: field name to order by. Format: fieldname:orderType. Example: height:desc, timestamp:asc (String)

Response

 {
  "success": true,
  "blocks": [
    "array of blocks (see below block object response)"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/blocks?generatorPublicKey=<generatorPublicKey>

Get Block

Gets block by provided id.

GET /api/blocks/get?id=id

  • id: Id of block.

Response

 {
    "success": true,
    "block": {
        "id": "Id of block. String",
        "version": "Version of block. Integer",
        "timestamp": "Timestamp of block. Integer",
        "height": "Height of block. Integer",
        "previousBlock": "Previous block id. String",
        "numberOfTransactions": "Number of transactions. Integer",
        "totalAmount": "Total amount of block. Integer",
        "totalFee": "Total fee of block. Integer",
        "reward": "Reward block. Integer",
        "payloadLength": "Payload length of block. Integer",
        "payloadHash": "Payload hash of block. Integer",
        "generatorPublicKey": "Generator public key. Hex",
        "generatorId": "Generator id. String.",
        "blockSignature": "Block signature. Hex",
        "confirmations": "Block confirmations. Integer",
        "totalForged": "Total block forged. Integer"
    }
}

Example

curl -k -X GET http://localhost:8000/api/blocks/get?id=<id>

Get Blockchain Fee

Get transaction fee for sending "normal" transactions.

GET /api/blocks/getFee

Response

 {
  "success": true,
  "fee": Integer
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getFee

Get Blockchain Fees Schedule

Get transaction fee for all types of transactions.

GET /api/blocks/getFees

Response

 {
  "success": true,
  "fees":{
    "send": Integer,
    "vote": Integer,
    "secondsignature": Integer,
    "delegate": Integer,
    "multisignature": Integer,
    "dapp": Integer
  }
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getFees

Get Blockchain Reward Schedule

Gets the forging reward for blocks.

GET /api/blocks/getReward

Response

 {
  "success": true,
  "reward": Integer
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getReward

Get Total Supply of Lisk Tokens (LSK)

Gets the total amount of Lisk in circulation

GET /api/blocks/getSupply

Response

 {
  "success": true,
  "supply": Integer
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getSupply

Get Blockchain Height

Gets the blockchain height of the client.

GET /api/blocks/getHeight

Response

 {
  "success": true,
  "height": "Height of blockchain. Integer"
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getHeight

Get Status of Height, Fee, Milestone, Blockreward and Supply

Gets status of height, fee, milestone, blockreward and supply

GET /api/blocks/getStatus

Response

 {
  "success": true,
  "height": Integer
  "fee": Integer
  "milestone": Integer
  "reward": Integer
  "supply": Integer
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getStatus

Get Blockchain Nethash

Gets the nethash of the blockchain on a client.

GET /api/blocks/getNethash

Response

 {
  "success": true,
  "nethash": "Nethash of the Blockchain. String"
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getNethash

Get Blockchain Milestone

Gets the milestone of the blockchain on a client.

GET /api/blocks/getMilestone

Response

 {
  "success": true,
  "milestone": Integer
}

Example

curl -k -X GET http://localhost:8000/api/blocks/getMilestone

Dapps

Apps registration

Registers a Blockchain Application.

PUT /api/dapps

Request

 {
  "secret": "Secret of account. String. Required",
  "secondSecret": "Second secret of account. String. Optional",
  "publicKey": "Public key to verify sender secret key. Hex. Optional",
  "category": "DApp category. Integer. Required",
  "name": "DApp name. String. Required",
  "description": "DApp description. String. Optional",
  "tags": "DApp tags. String. Optional",
  "type": "DApp type. Integer. Required (Only type 0 is currently supported)",
  "link": "Link to DApp file. ZIP supported. String. Required",
  "icon": "Link to icon file. PNG and JPG/JPEG supported. String. Optional"
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>"
"category":<INSERT INTEGER HERE>,"name":"<INSERT APPLICATION NAME HERE>",
"type":0,"link":"<INSERT LINK TO APPLICATION HERE>"}' \
http://localhost:8000/api/dapps

Get Apps

Gets a list of Blockchain Applications registered on the network.

GET /api/dapps?category=category&name=name&type=type&link=link&limit=limit&offset=offset&orderBy=orderBy

  • category: DApp category. (Integer)
  • name: DApp name. (String)
  • type: DApp type. (Integer)
  • link: DApp link. (String)
  • limit: Query limit. Maximum is 100. (Integer)
  • offset: Query offset. (Integer)
  • orderBy: Order by field. (String)

Response

 {
  "success": true,
  "dapps": "array of dapps"
}

Example

curl -k -X GET http://localhost:8000/api/dapps?name=<INSERT APPLICATION NAME HERE>

Get App

Gets a specific Blockchain Application by registered id.

GET /api/dapps/get?id=id

  • id: Id of app

Response

 {
  "success": true,
  "dapp": "dapp object"
}

Example

curl -k -X GET http://localhost:8000/api/dapps/get?id=<id>

Search for Apps

Searches for Blockchain Applications by filter(s) on a node.

GET /api/dapps/search?q=q&category=category&installed=installed

  • q: Search criteria. (String)
  • category: Category to search within. (Integer)
  • installed: Search installed apps only. 1 or 0. (Integer)

Response

 {
  "success": true,
  "dapps": [
    "array of dapps"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/search?installed=1

Install App

Installs a app by id on the node.

POST /api/dapps/install

Request

 {
  "id": "Blockchain Application id to install"
}

Response

 {
  "success": true,
  "path": "dppp install path"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/install

Installed Apps

Returns a list of installed apps on the requested node.

GET /api/dapps/installed

Response

 {
  "success": "true",
  "dapps": [
    "array of dapps"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installed

Installed Apps Ids

Returns a list of installed app ids on the requested node.

GET /api/dapps/installedIds

Response

 {
  "success": true,
  "ids": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installedIds

Uninstall Apps

Uninstalls a app by id from the requested node.

POST /api/dapps/uninstall

Request

 {
  "id": "Blockchain Application id to install"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/uninstall

Launch App

Launches a app by id on the requested node.

POST /api/dapps/launch

Request

 {
  "id": "dapp id to launch",
  "params": "dapp launch params, not required, array"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/launch

Installing

Returns a list of app ids currently being installed on the requested node.

GET /api/dapps/installing

Response

 {
  "success": true,
  "installing": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/installing

Uninstalling

Returns a list of app ids currently being uninstalled on the client node.

GET /api/dapps/uninstalling

Response

 {
  "success": true,
  "uninstalling": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/uninstalling

Launched

Returns a list of app ids which are currently launched on the client node.

GET /api/dapps/launched

Response

 {
  "success": true,
  "launched": [
    "array of dapp ids"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/dapps/launched

Categories

Returns a full list of app categories.

GET /api/dapps/categories

Response

 {
  "success": true,
  "category": "object containing category names and ids"
}

Example

curl -k -X GET http://localhost:8000/api/dapps/categories

Stop App

Stops a app by id on the requested node.

POST /api/dapps/stop

Request

 {
  "id": "dapp id to stop"
}

Response

 {
  "success": true
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"id":"<INSERT ID HERE>"}' \
http://localhost:8000/api/dapps/stop

Delegates

Enable Delegate on Account

Puts request to create a delegate.

PUT /api/delegates

Request

 {
  "secret": "Secret key of account",
  "secondSecret": "Second secret of account",
  "username": "Username of delegate. String from 1 to 20 characters."
}

Response

 {  
   "success":true,
   "transaction":{  
      "type": "Type of transaction. Integer",
      "amount": "Amount. Integer",
      "senderPublicKey": "Sender public key. String",
      "requesterPublicKey": "RequesterString",
      "timestamp": "Time. Integer",
      "asset":{  
         "delegate":{  
            "username username. },
      "recipientId": "Recipient address. String",
      "signature": "Signature. String",
      "signSignature": "Sign signature. String",
      "id": "Tx ID. String",
      "fee": "Fee. Integer",
      "senderId": "Sender address. String",
      "relays": "Propagation. Integer",
      "receivedAt": "Time. String"
   }
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>","username":"<INSERT USERNAME HERE>" }' \
http://localhost:8000/api/delegates

Get Delegates List

Gets list of delegates by provided filter.

GET /api/delegates?limit=limit&offset=offset&orderBy=orderBy

  • limit: Limit to show. Integer. Maximum is 100. (Integer)
  • offset: Offset (Integer)
  • orderBy: Order by field (String)

Response

 {
  "success": true,
  "delegates": "delegates objects array"
}
  • Delegates Array includes: delegateId, address, publicKey, vote (#section- of votes), producedBlocks, missedBlocks, rate, productivity

Example

curl -k -X GET http://localhost:8000/api/delegates?limit=<limit>

Get Delegate

Gets delegate by public key or username.

GET /api/delegates/get?publicKey=publicKey

  • publicKey: Public key of delegate account (String)

GET /api/delegates/get?username=username

  • username: Username of delegate account (String)

Response

 {
    "success": true,
    "delegate": {
        "username": "Username. String",
        "address": "Address. String",
        "publicKey": "Public key. String",
        "vote": "Total votes. Integer",
        "producedblocks": "Produced blocks. Integer",
        "missedblocks": "Missed blocks. Integer",
        "rate": "Ranking. Integer",
        "approval": "Approval percentage. Float",
        "productivity": "Productivity percentage. Float"
    }
}

Example

curl -k -X GET http://localhost:8000/api/delegates/get?publicKey=publicKey

Search for Delegates

Search for Delegates by "fuzzy" username.

GET /api/delegates/search?q=username&orderBy=producedblocks:desc

  • q: Search criteria. (String)
  • orderBy: Order results by ascending or descending property. Valid sort fields are: username:asc, username:desc, address:asc, address:desc, publicKey:asc, publicKey:desc, vote:asc, vote:desc, missedblocks:asc, missedblocks:desc, producedblocks:asc, producedblocks:desc

Response

 {
  "success": true,
  "delegates": [
    "array of delegates"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/delegates/search?q=username&orderBy=producedblocks:desc

Get Delegates Count

Get total count of registered delegates.

GET /api/delegates/count

Response

 {
  "success": true,
  "count": 101
}

Example

curl -k -X GET http://localhost:8000/api/delegates/count

Get votes of account

Get votes by account wallet address.

GET /api/accounts/delegates/?address=address

  • address: Address of account. (String)

Response

 {
  "success": true,
  "delegates": [
      "array of of delegates object (see above delegate object response)"
    ]
}
  • Delegates Array includes: delegateId, address, publicKey, vote (#section- of votes), producedBlocks, missedBlocks, rate, productivity

Example

curl -k -X GET http://localhost:8000/api/accounts/delegates/?address=<address>

Get Voters

Get voters of delegate.

GET /api/delegates/voters?publicKey=publicKey

  • publicKey: Public key of registered delegate account. (String)

Response

 {
  "success": true,
  "accounts": [
    {
      username: "Voter username. String",
      address: "Voter address. String",
      publicKey: "Voter public key. String",
      balance: "Voter balance. String"
    }
  ]
}

Example

curl -k -X GET http://localhost:8000/api/delegates/voters?publicKey=<publicKey>

Enable Forging on Delegate

Enables forging for a delegate on the client node.

POST /api/delegates/forging/enable

Request

 {
  "secret": "secret key of delegate account"
}

Response

 {
  "success": true,
  "address": "address"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>"}' \
http://localhost:8000/api/delegates/forging/enable

Disable Forging on Delegate

Disables forging for a delegate on the client node.

POST /api/delegates/forging/disable

Request

 {
  "secret": "secret key of delegate account"
}

Response

 {
  "success": true,
  "address": "address"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>"}' \
http://localhost:8000/api/delegates/forging/disable

Get Forged by Account

Get amount of Lisk forged by an account.

GET /api/delegates/forging/getForgedByAccount?generatorPublicKey=generatorPublicKey

Required

  • generatorPublicKey: generator id of block in hex. (String)

Optional

  • start: Sets the start time of the search - timestamp UNIX time. (String)
  • end: Sets the endtime of the search - timestamp UNIX time. (String)

Response

 {
  "success": true,
  "fees": "Forged amount. Integer",
  "rewards":"Forged amount. Integer",
  "forged":"Forged amount. Integer"
}

Example

curl -k -X GET http://localhost:8000/api/delegates/forging/getForgedByAccount?generatorPublicKey=<generatorPublicKey>

Get Next Forgers

Get next delegate lining up to forge.

GET /api/delegates/getNextForgers?limit=limit

  • limit: limits the amount of delegates returned, default 10, max 101 (Integer)

Response

 {
  "success": true,
  "currentBlock": "Current block based on height. Integer",
  "currentSlot": "Current slot based on time. Integer",
  "delegates": [
          "array of publicKeys. Strings"
        ]
}

Example

curl -k -X GET http://localhost:8000/api/delegates/getNextForgers

Loader

Note

Provides the synchronization and loading information of a client. These API calls will only work if the client is syncing or loading.

Get Loading Status

Returns the sync status of the blockchain.

GET /api/loader/status

Response

 {
   "success": true,
   "loaded": "Is blockchain loaded? Boolean: true or false",
   "now": "Last block loaded during loading time. Integer",
   "blocksCount": "Total blocks count in blockchain at loading time. Integer"
}

Example

 curl -k -X GET http://localhost:8000/api/loader/status/

Get Synchronization Status

Get the synchronization status of the client.

GET /api/loader/status/sync

Response

 {
   "success": true,
   "syncing": "Is wallet is syncing with another peers? Boolean: true or false",
   "blocks": "Number of blocks remaining to sync. Integer",
   "height": "Total blocks in blockchain. Integer",
   "broadhash": "Block propagation efficiency and reliability. String",
   "consensus": "Efficiency (%). Integer"
}

Example

 curl -k -X GET http://localhost:8000/api/loader/status/sync

Get Block Receipt Status

Get the status of last received block. Returns true if block was received in the past 120 seconds.

GET /api/loader/status/ping

Response

 {
   "success": true
}

Example

 curl -k -X GET http://localhost:8000/api/loader/status/ping

Multi-signature

Create Multi-signature Account

Create a multi-signature account.

PUT /api/multisignatures

Request

 {
    "secret": "your secret. string. required.",
    "secondSecret": "your second secret of the account. optional",
    "lifetime": "request lifetime in hours (1-72). required.",
    "min": "minimum signatures needed to approve a tx or a change (1-16). integer. required",
    "keysgroup": [array of public keys strings]. add '+' before publicKey to add an account. required. immutable.
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","lifetime":<INSERT NUMBER HERE>,"min":<INSERT NUMBER OF SIGNATURES HERE>,"keysgroup":["+<INSERT PUBLIC KEY HERE>","+<INSERT PUBLIC KEY HERE>"] }' \
http://localhost:8000/api/multisignatures

Get Multi-signature Accounts

Gets a list of accounts that belong to a multi-signature account.

GET /api/multisignatures/accounts?publicKey=publicKey

  • publicKey: Public key of multi-signature account (String)

Response

 {
  "success": true,
  "accounts": "array of accounts",
  "accounts": [
    {
      "address": "Multisig account. String",
      "balance": "Multisig account balance. String",
      "multisignatures": [
        "Multisig public key member. String"
      ],
      "multimin": "Min N of sign for a valid tx. Integer",
      "multilifetime": "Lifetime. Integer",
      multisigaccounts": [
        {
          "address": "Multisig address member. String",
          "publicKey": "Multisig public key member. String",
          "balance": "Multisig balance member. String"
        }
      ]
    }
  ]
}

Example

curl -k -X GET http://localhost:8000/api/multisignatures/accounts?publicKey=<publicKey>

Sign Multi-signature Transaction

Signs a transaction that is awaiting signature.

POST /api/multisignatures/sign

Request

 {
  "secret": "your secret. string. required.",
  "publicKey": "public key of your account. string. optional.",
  "transactionId": "id of transaction to sign. REQUIRED"
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>","transactionId":"<INSERT TRANSACTION ID HERE>"}' \
http://localhost:8000/api/multisignatures/sign

Get Pending Multi-signature Transactions

Returns a list of multi-signature transactions that waiting for signature by publicKey.

GET /api/multisignatures/pending?publicKey=publicKey

  • publicKey: Public key of account (String)

Response

 {
  "success": true,
  "transactions": [
    {
      "max": "Max. Integer",
      "min": "Min. Integer",
      "lifetime": "Lifetime. Integer",
      "signed": true,
      "transaction": {
        "type": "Type of transaction. Integer",
        "amount": "Amount. Integer",
        "senderPublicKey": "Sender public key of transaction. Hex",
        "requesterPublicKey": "Requester public key. String",
        "timestamp": "Timestamp. Integer",
        "asset": {
          "multisignature": {
            "min": "Min signatures needed for valid tx. Integer",
            "keysgroup": [
              "+Multisig public key member. String"
            ],
            "lifetime": "Lifetime. Integer",
          }
        },
        "recipientId": "Recipient address. String",
        "signature": "Signature. String",
        "signSignature": "Sign signature. String",
        "id": "Tx ID",
        "fee": "Fee. Integer",
        "senderId": "Sender address. String",
        "relays": "Propagation. Integer",
        "receivedAt": "Time. String",
        "signatures": [
          "array of signatures"
        ],
        "ready": false
      }
    }
  ]
}

Example

curl -k -X GET http://localhost:8000/api/multisignatures/pending?publicKey=<publicKey>

Peers

Get Peers List

Gets list of peers from provided filter parameters.

GET /api/peers?state=state&os=os&version=version&limit=limit&offset=offset&orderBy=orderBy

  • state: State of peer. 1 - disconnected. 2 - connected. 0 - banned. (Integer)
  • os: OS of peer. (String)
  • version: Version of peer. (String)
  • limit: Limit to show. Max limit is 100. (Integer)
  • offset: Offset to load. (Integer)
  • orderBy: Name of column to order. After column name must go "desc" or "acs" to choose order type. (String)

All parameters joins by "OR".

Example
/api/peers?state=1&version=0.3.2 looks like: state=1 OR version=0.3.2

Response

 {
  "success": true,
  "peers": [
    "List of peers as objects (see below the peer object response)"
  ]
}

Example

curl -k -X GET http://localhost:8000/api/peers

Get Peer

Gets peer by IP address and port.

GET /api/peers/get?ip=ip&port=port

  • ip: Ip of peer. (String);
  • port: Port of peer. (Integer)

Response

 {
  "success": true,
  "peer": {
        "ip":"Requested ip. String",
        "port":"Requested port. Integer",
        "state":"1 - disconnected. 2 - connected. 0 - banned. Integer",
        "os":"Operating system. String",
        "version":"Lisk client version. String",
        "broadhash":"Peer block propagation efficiency and reliability. String",
        "height":"Blockchain height. Integer"
  }
}

Example

curl -k -X GET http://localhost:8000/api/peers/get?ip=<ip>&port=<port>

Get Peer Version/Build Time

Gets a list peer versions and build times.

GET /api/peers/version

Response

 {
  "success": true,
  "version": "Version of Lisk. String",
  "build": "Time of build. String"
}

Example

curl -k -X GET http://localhost:8000/api/peers/version

Signatures

Get Signature Fees

Gets the second signature status of an account.

GET /api/signatures/fee

Response

 {
    "success" : true,
    "fee" : Integer
}

Example

 curl -k -X GET http://localhost:8000/api/signatures/fee

Add Second Signature

Add a second signature to an account.

PUT /api/signatures

Request

 {
  "secret": "secret key of account",
  "secondsecret": "second secret key of account",
  "publicKey": "optional, to verify valid secret key and account"
}

Response

 {  
   "success": true,
   "transaction": {  
      "type": "Type of transaction. Integer",
      "amount": "Amount. Integer",
      "senderPublicKey": "Sender public key. String",
      "requesterPublicKey": "Requester public key. String",
      "timestamp": Integer,
      "asset":{  
         "signature":{  
            "publicKey": "Public key. String"
         }
      },
      "recipientId": "Recipient address. String",
      "signature": "Signature. String",
      "id": "Tx ID. String",
      "fee": "Fee Integer",
      "senderId": "Sender address. String",
      "relays": "Propagation. Integer",
      "receivedAt": "Time. String"
   }
}

Example

 curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>","publicKey":"<INSERT PUBLIC KEY HERE>" }' \
http://localhost:8000/api/signatures

Transactions

Get List of Transactions
List of transactions matched by provided parameters.

GET /api/transactions?blockId=blockId&senderId=senderId&recipientId=recipientId&limit=limit&offset=offset&orderBy=field

Response

 {
  "success": true,
  "transactions": [
    "list of transactions objects"
  ]
}
  • blockId: Block id of transaction. (String)
  • senderId: Sender address of transaction. (String)
  • recipientId: Recipient of transaction. (String)
  • limit: Limit of transaction to send in response. Default is 20. (Number)
  • offset: Offset to load. (Integer number)
  • orderBy: Name of column to order. After column name must go "desc" or "asc" to choose order type. Example: orderBy=timestamp:desc (String)

All parameters join by "OR" by default, to join with "AND" specify AND: in front of the parameter.

Example - blockId

curl -k -X GET http://localhost:8000/api/transactions?blockId=<blockId>

Example - senderId

curl -k -X GET http://localhost:8000/api/transactions?senderId=<senderId>

Example - recipientId

curl -k -X GET http://localhost:8000/api/transactions?recipientId=<recipientId>

Send Transaction

Send transaction to broadcast network.

PUT /api/transactions

Request

 {
    "secret" : "Secret key of account",
    "amount" : /* Amount of transaction * 10^8. Example: to send 1.1234 LISK, use 112340000 as amount */,
    "recipientId" : "Recipient of transaction. Address or username.",
    "publicKey" : "Public key of sender account, to verify secret passphrase in wallet. Optional, only for UI",
    "secondSecret" : "Secret key from second transaction, required if user uses second signature"
}

Response

 {
  "success": true,
  "transactionId": "id of added transaction"
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","amount":<INSERT AMOUNT HERE>,"recipientId":"<INSERT WALLET ADDRESS HERE>"}' \
http://localhost:8000/api/transactions

Example - Second Secret

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","secondSecret":"<INSERT SECOND SECRET HERE>",
"amount":<INSERT AMOUNT HERE>,"recipientId":"<INSERT WALLET ADDRESS HERE>"}' \
http://localhost:8000/api/transactions

Get Transaction

Get transaction that matches the provided id.

GET /api/transactions/get?id=id [- id: String of transaction (String)]

Response

 {
  "success": true,
  "transaction": {
    "id": "Id of transaction. String",
    "height": "Tx blockchain height. Integer",
    "blockId" "Tx blockId. String",
    "type": "Type of transaction. Integer",
    "timestamp": "Timestamp of transaction. Integer",
    "senderPublicKey": "Sender public key of transaction. Hex",
    "senderId": "Address of transaction sender. String",
    "recipientId": "Recipient id of transaction. String",
    "amount": "Amount. Integer",
    "fee": "Fee. Integer",
    "signature": "Signature. Hex",
    "signatures": "Signatures. Array",
    "confirmations": "Number of confirmations. Integer",
    "asset": "Resources. Object"
  }
}

Example

curl -k -X GET http://localhost:8000/api/transactions/get?id=<id>

Get Unconfirmed Transaction

Get unconfirmed transaction that matches the provided id.

GET /api/transactions/unconfirmed/get?id=id [- id: String of transaction (String)]

Response

 {
  "success": true,
  "transaction": {
    "type": "Type of transaction. Integer",
    "amount": "Amount. Integer",
    "senderPublicKey": "Sender public key of transaction. Hex",
    "timestamp": "Timestamp of transaction. Integer",
    "asset": "Resources. Object"
    "recipientId": "Recipient id of transaction. String",
    "signature": "Signature. Hex",
    "id": "Id of transaction. String",
    "fee": "Fee. Integer",
    "senderId": "Address of transaction sender. String",
    "relays": "Propagation. Integer",
    "receivedAt": "Timestamp. String"
  }
}

Example

curl -k -X GET http://localhost:8000/api/transactions/unconfirmed/get?id=<id>

Get List of Unconfirmed Transactions

Gets a list of unconfirmed transactions.

GET /api/transactions/unconfirmed

Response

 {
    "success" : true,
    "transactions" : [list of transaction objects]
}

Example

curl -k -X GET http://localhost:8000/api/transactions/unconfirmed

Get List of Queued Transactions

Gets a list of queued transactions.

GET /api/transactions/queued

Response

 {
    "success" : true,
    "transactions" : [list of transaction objects]
}

Example

curl -k -X GET http://localhost:8000/api/transactions/queued

Get Specific Queued Transaction

Get queued transaction that matches the provided id.

GET /api/transactions/queued/get?id=id [- id: String of transaction (String)]

Response

 {
  "success": true,
  "transaction": {
    "id": "Id of transaction. String",
    "type": "Type of transaction. Integer",
    "subtype": "Subtype of transaction. Integer",
    "timestamp": "Timestamp of transaction. Integer",
    "senderPublicKey": "Sender public key of transaction. Hex",
    "senderId": "Address of transaction sender. String",
    "recipientId": "Recipient id of transaction. String",
    "amount": "Amount. Integer",
    "fee": "Fee. Integer",
    "signature": "Signature. Hex",
    "signSignature": "Second signature. Hex",
    "confirmations": "Number of confirmations. Integer"
  }
}

Example

curl -k -X GET http://localhost:8000/api/transactions/queued/get?id=<id>