NAV Navbar
shell
  • Introduction
  • Objects
  • Address API
  • Token API
  • Transaction API
  • Introduction

    API Endpoint
    
    https://api.indiesquare.me/eth/v1/
    

    IndieSquare API provides digital token management features. It makes it easy to create your own token on the blockchain or integrate digital token into your applications. Currently, IndieSquare API supports Counterparty as a blockchain platform.

    Schema

    All API access is over HTTPS, and accessed from the https://api.indiesquare.me url. All data is sent and received as JSON.

    Timezones

    All timestamps are returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ e.g. 2014-02-27T15:05:06+01:00

    API Key

    Everyone can use IndieSquare API without an API Key however requests may be limited. IndieSquare API will return HTTP 429 response if you exceed the limitation. You can create an API Key on Indieboard.

    GET API Key

    HTTP status code 401 will be returned if the provided API Key is not a valid.

    Request with API Key
    
    curl -H 'X-Api-Key:abcd0efg12hi3j4klm5n678opqrstu9vwxyz' https://api.indiesquare.me/eth/v1/addresses/0xf46Df8036B5FeA40d5CB978Af23D2C9c111223Cb/balance
    

    Objects

    IndieSquare’s API returns these objects below.

    Balance

    Balance Object represents a public address on the blockchain and their balances.

    Attribute Type Description
    token String The token name
    symble String The token symbole
    balance String The balance
    unconfirmedBalance String The unconfirmed balance

    Token

    Token Object represents a token's information.

    Attribute Type Description
    token String The token name
    symble String The token symbole
    decimals String The token decimals
    totalSupply String The token Total Supply

    Tx

    Tx Object represents a transaction's information.

    Attribute Type Description
    nonce String The nonce value
    gasPrice String The gas price value
    gasLimit String The gas limit value
    to String The destination ether address
    value String The amount of ether value
    data String The data value
    chainId String The chain Id

    TxHash

    TxHash Object represents a Tx Hash's information.

    Attribute Type Description
    txHash String Tx Hash

    Address API

    IndieSquare’s Address API allows you to look up information on a particular token about public addresses on the blockchain.

    Ether Balance

    curl https://api.indiesquare.me/eth/v1/addresses/0xf46Df8036B5FeA40d5CB978Af23D2C9c111223Cb/balance
    
    {
      "token": "ETH",
      "symbol": "ETH",
      "balance": "0.11671390925912771",
      "unconfirmedBalance": "0"
    }
    

    The Address Ether Balance Endpoint is a method to get a subset of information on a public address.

    Resource Method Return Object
    /addresses/:ether-address/balances GET Balance

    Token Balance

    curl https://api.indiesquare.me/eth/v1/addresses/0xf46Df8036B5FeA40d5CB978Af23D2C9c111223Cb/tokens/0x41e5560054824ea6b0732e656e3ad64e20e94e45/balance
    
    {
      "token": "Civic",
      "symbol": "CVC",
      "balance": "0.79625692",
      "unconfirmedBalance": "0"
    }
    

    The Issued Token Endpoint Endpoint is a method to get issued token information.

    Resource Method Return Object
    /addresses/:ether-address/tokens/:contract-address/balances GET Balance

    Token API

    IndieSquare’s Token API allows you to look up information about token information.

    Token

    curl https://api.indiesquare.me/eth/v1/tokens/0x41e5560054824ea6b0732e656e3ad64e20e94e45
    
    {
      "totalSupply": "1000000000",
      "name": "Civic",
      "symbol": "CVC",
      "decimals": "8"
    }
    

    Token Endpoint is a method to look up the detailed information of a particular token.

    Resource Method Return Object
    /tokens/:contract-address GET Token

    Transaction API

    IndieSquare’s Transaction API allows you to create transactions and broadcast transactions.

    Create Send Transaction

    curl -H "Content-Type: application/json" -X POST -d '{"from": "0xBdDF0BF3Ac858D7Fb8A2bDDa55884d61779BA5a9", "to": "0x5dbb9793537515398a1176d365b636a5321d9e39", "token": "ETH", "amount": "1"}' https://api.indiesquare.me/eth/v1/transactions/send
    
    {
      "nonce": "0x0",
      "gasPrice": "0x7dea31200",
      "gasLimit": "0x5208",
      "to": "0x5dbb9793537515398a1176d365b636a5321d9e39",
      "value": "0xde0b6b3a7640000",
      "data": "",
      "chainId": "0x1"
    }
    

    Create Send Transaction Endpoint is a method to create a send transaction and return the unsigned tx.

    Resource Method Return Object
    /transactions/send POST Tx
    Parameter Type Description
    from String The source ether address
    to String The destination ether address
    token String The token name ("ETH" or "contract-address")
    amount String The token amount (Ether)

    Broadcast Transaction

    curl -H "Content-Type: application/json" -X POST -d '{"tx": "f8a9048504a817c800828e1d945a65585ce8213d1c9433e63d53d4e468540a501980b844a9059cbb0000000000000000000000008005ceb675d2ff8c989cc95354438b9fab56868100000000000000000000000000000000000000000000000000000000000000012aa02edf96077563a19a4c618b009762a26b9555c72ce1106f7109867d5383092264a0109726db9e5ef24e22021c65b5dadf2121f95ba447ad8d4f77d638223f26b107"}' https://api.indiesquare.me/eth/v1/transactions/broadcast
    
    {
      "txHash": "0x3d3a177022dfbfacbab6281703c2bf52e2df21957449efd582d14759dfcf7314"
    }
    

    Broadcast Transaction Endpoint is a method to broadcast the signed transaction and return the tx hash.

    Resource Method Return Object
    /transactions/broadcast POST TxHash
    Parameter Type Description
    tx String The signed transaction