Documentation

Getting Started

Longhorn’s patent-pending Memory-mapped database technology make interacting with blockchains reliable and fast, in real-time. To get started, sign up for a Longhorn account.

BullPay provides a standards-based REST interface which enables application developers to interact in a powerful, yet simple way with their Longhorn account. Using the Longhorn API, clients can send and confirm transactions, view balances, retrieve real-time transactions, view historical ledger entries, and much more. Developers may call the API directly over HTTPS using the language of their choice.

API Pattern

All supported blockchains follow this pattern:

https://longhorn.bullpay.com/api/$METHOD/

Changelog and Errors

Our documentation is powered by Google Group. Be sure to subscribe to Longhorn’s mailing list to receive information on new additions and changes to Longhorn’s API and Block Explorer. If there’s an error or you’d like to suggest a change, please email us directly at longhorn@bullpay.com.

Errors

Error Code Meaning
200 – OK Everything worked as expected.
400 – Bad Request The request was unacceptable, often due to missing a required parameter.
401 – Unauthorized No valid API key provided.
402 – Request Failed The parameters were valid but the request failed.
404 – Not Found The requested resource doesn’t exist.
409 – Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
500, 502, 503, 504 – Server Errors Something went wrong on Bullpay’s end. (These are rare.)

Try It

We have swagger set up to interact with our API. Try it here.

Development

All Blockchains

Send Transactions

The Send Transactions Object

Example Request

curl -X POST -H Content-Type: application/json" -H "apiKey: {YOUR_API_KEY}" -d "{TRANSACTION_HASH}" https://longhorn.bullpay.com/api/Send/6

Example Response

"success"

Send a signed raw transaction for a particular gateway over the Longhorn network.

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
transaction The signed raw transactions.

POST Transactions

Send transactions.

HTTP Request

POST
https://longhorn.bullpay.com/api/Send/{gatewayId}

Get Balance

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetBalance/6/LfcUcxALy1gSeqZLrixAm4ETZbEWA7GLat

Example Response

{
    "inputs": 5000000000.0,
    "outputs": 5000000000.0,
    "balance": 0.0
}

The Get Balance Object

Get the coin balance of a wallet address for a particular coin gateway.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
address The wallet address to locate.

Get Balances

Get balances.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetBalance/{gatewayId}/{address}

Get Transactions

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetTransactions/6/LfcUcxALy1gSeqZLrixAm4ETZbEWA7GLat/1/10

Example Response

{
    "address": LfcUcxALy1gSeqZLrixAm4ETZbEWA7GLat,
    "txs":[
        "5c8f31da75ab5bff67e232f6bdeaa693eef9b2ff344a300dbce6def3c880b4e5",
        "1ea3f171d4b77016f7af96e2f43b7298529ef6f987a5f1c9fe560765f1565afd"
    ],
    "totalRows": 0.0
}

The Get Transactions Object

Get transactions for a wallet address of a gateway.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
address The wallet address to locate.
start* The address to start with.
count The wallet address to locate.

* The start cannot be 0. Records are stored in a 1-based array.

Get Transactions

Get transactions for a wallet address of a gateway. Results from memory pool will also be displayed. Memory pool transactions are transactions that have been submitted to the network but are not contained within a block yet.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetTransactions/{gatewayId}/{address}/{start}/{count}

Get Transaction

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetTransaction/6/1ea3f171d4b77016f7af96e2f43b7298529ef6f987a5f1c9fe560765f1565afd

Example Response

{
    "gatewayId": 6,
    "hash": "1ea3f171d4b77016f7af96e2f43b7298529ef6f987a5f1c9fe560765f1565afd",
    "total": "5000000000",
    "blockHeight": 100,
    "outputs":[
        {
        "address": "LfcUcxALy1gSeqZLrixAm4ETZbEWA7GLat",
        "amount": "5000000000",
        "script": "4104458bf7d944ce58c007d0f16fa54c0640694568954e162c06be0a0cba7275714b6672c589e7393fa48f8a5f6b6259061d394e9db005651d1bb28349d31339daa8ac",
        "index": 0,
        }
    ],
    "inputs":[
        {
        "script": "049e55964e010a",
        "previous_txid": "049e55964e010a",
        "index": 0,
        }
    ],
    "blockHash": "97ea5cb96baa9448d494eb083a7b1b6884e99a89522d89150e0b4378c742a6da",
    "raw": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff07049e55964e010affffffff0100f2052a01000000434104458bf7d944ce58c007d0f16fa54c0640694568954e162c06be0a0cba7275714b6672c589e7393fa48f8a5f6b6259061d394e9db005651d1bb28349d31339daa8ac00000000",
    "txdate": "10/13/2011 3:06:06 AM",
}

The Get Transaction Object

Get a transaction for a wallet address of a gateway.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
taxid The transaction ID to locate.

Get Transaction

Get transaction.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetTransaction/{gatewayId}/{txid}

Get Raw Transaction

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetRawTransaction/6/1ea3f171d4b77016f7af96e2f43b7298529ef6f987a5f1c9fe560765f1565afd

Example Response

"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff07049e55964e010affffffff0100f2052a01000000434104458bf7d944ce58c007d0f16fa54c0640694568954e162c06be0a0cba7275714b6672c589e7393fa48f8a5f6b6259061d394e9db005651d1bb28349d31339daa8ac00000000"

The Get Raw Transaction Object

Get a transaction for a wallet address of a gateway.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
taxid The transaction ID to locate.

Get Raw Transaction

Get raw transaction.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetRawTransaction/{gatewayId}/{txid}

Get Gateways

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59" 
https://longhorn.bullpay.com/api/GetGateways

Example Response

{
    "Vantiv": 1,
    "Bitcoin": 2,
    "Visa": 3,
    "Ethereum": 4,
    "Waves": 5,
    "Litecoin": 6,
    "Dash": 7,
    "Dogecoin": 8,
    "BitcoinCash": 9,
    "Ripple": 10,
    "Augur": 11,
    "Qtum": 12,
    "OmiseGO": 13,
    "Maker": 14,
    "EOS": 15,
    "TenXPay": 16,
    "MetalPay": 17,
    "Golem": 17,
    "Bat": 19,
    "Kyber": 20,
    "Digix": 21,
    "Iconomi": 22,
    "Civic": 23,
    "ZRX": 24,
    "Status": 25,
    "SingularDTV": 26,
    "Bancor": 27,
    "Gnosis": 28,
    "Monaco": 29,
    "FunFair": 30,
    "Bitquence": 31,
    "Aragon": 32,
    "Taas": 33,
    "Edgeless": 34,
    "RLC": 35,
    "STORJ": 36,
    "Wings": 37,
    "Melon": 38,
    "Monero": 39,
    "ZCash": 40,
    "BitcoinTestnet": 41,
    "EthereumRinkeby": 42,
    "LitecoinTestnet": 43,
    "PayPal": 44
}

The Get Gateways Object

Gets a list of all blockchain gateways.

Attribute Description
apiKey This is your API Key.

Get Gateways

Get gateways.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetRawTransaction/{gatewayId}/{txid}

Block Height To Hash

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/BlockHeightToHash/6/100

Example Response

"97ea5cb96baa9448d494eb083a7b1b6884e99a89522d89150e0b4378c742a6da"

The Block Height To Hash Object

Convert a block height to a block hash.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
height The height to convert.

Block Height To Hash

Convert a block height to a block hash.

HTTP Request

GET
https://longhorn.bullpay.com/api/BlockHeightToHash/{gatewayId}/{height}

Block Hash To Height

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/BlockHashToHeight/6/97ea5cb96baa9448d494eb083a7b1b6884e99a89522d89150e0b4378c742a6da

Example Response

100

The Block Hash To Height Object

Convert a block hash to a block height.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
hash The hash to convert.

Block Hash To Height

Convert a block hash to a block height.

HTTP Request

GET
https://longhorn.bullpay.com/api/BlockHeightToHash/{gatewayId}/{hash}

Get Stats

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59" 
https://longhorn.bullpay.com/api/GetGateways

Example Response

{
    "gatewayId": 6,
    "height": 1512802,
    "blockhash": null,
    "previousBlockhash": null,
    "totalTransactions": 28510987,
    "totalAddressesIndexed": 153204067,
    "version": "1.0 alpha"
}

The Block Hash To Height Object

Get the indexers statistics for the supplied gateway.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.

Block Hash To Height

Convert a block hash to a block height.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetStats/{gatewayId}

Ethereum Specific

Get Contracts

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetContracts/4/1/10

Example Response

{
    "contracts":[
        {
        "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
        "blockNumber": "0x61f2cb",
        "contractAddress": "0x00000000007f6202ba718df41ec639b32dd7fbcf",
        "cumulativeGasUsed": "0x5ab2d7",
        "from": "0x387788908f8380536385cebdead4280a3919d0de",
        "gasUsed": "0x507b1a",
        "logs":[
            {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "topics":[
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x00000000000000000000000000000000007f6202ba718df41ec639b32dd7fbcf",
                "0x0000000000000000000000002240dab907db71e64d3e0dba4800c83b5c502d4e"
            ],
            "data": "0xff00000000000000000000000000000000000000000000000000000000000000",
            "blockNumber": "0x61f2cb",
            "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
            "transactionIndex": "0xb",
            "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
            "logIndex": "0xa",
            "removed": false
            },
            {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "topics":[
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x00000000000000000000000000000000007f6202ba718df41ec639b32dd7fbcf",
                "0x00000000000000000000000014fbca95be7e99c15cc2996c6c9d841e54b79425"
            ],
            "data": "0xff00000000000000000000000000000000000000000000000000000000000000",
            "blockNumber": "0x61f2cb",
            "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
            "transactionIndex": "0xb",
            "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
            "logIndex": "0xb",
            "removed": false
            },
            {
            "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
            "topics":[
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x00000000000000000000000000000000007f6202ba718df41ec639b32dd7fbcf",
                "0x00000000000000000000000014fbca95be7e99c15cc2996c6c9d841e54b79425"
            ],
            "data": "0xff00000000000000000000000000000000000000000000000000000000000000",
            "blockNumber": "0x61f2cb",
            "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
            "transactionIndex": "0xb",
            "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
            "logIndex": "0xc",
            "removed": false
            },
        ]},
    ],
    "totalRows": 2037948
}

The Get Contracts Object

List contracts on the Ethereum network.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
start* The address to start with. The start cannot be 0. Records are stored in a 1-based array.
count The wallet address to locate.

Get Contracts

Get contracts.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetContracts/{gatewayId}/{start}/{count}

Get Contract

Example Request

curl -X GET -H Content-Type: application/json" -H "apiKey: test_c21f4360-762f-47c1-8964-d0c2322f5d59"
https://longhorn.bullpay.com/api/GetContract/4/0x00000000007f6202ba718df41ec639b32dd7fbcf

Example Response

{
    "contract":[
        {
        "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
        "blockNumber": "0x61f2cb",
        "contractAddress": "0x00000000007f6202ba718df41ec639b32dd7fbcf",
        "cumulativeGasUsed": "0x5ab2d7",
        "from": "0x387788908f8380536385cebdead4280a3919d0de",
        "gasUsed": "0x507b1a",
        "logs":[
            {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "topics":[
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x00000000000000000000000000000000007f6202ba718df41ec639b32dd7fbcf",
                "0x0000000000000000000000002240dab907db71e64d3e0dba4800c83b5c502d4e"
            ],
            "data": "0xff00000000000000000000000000000000000000000000000000000000000000",
            "blockNumber": "0x61f2cb",
            "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
            "transactionIndex": "0xb",
            "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
            "logIndex": "0xa",
            "removed": false
            },
            {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "topics":[
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x00000000000000000000000000000000007f6202ba718df41ec639b32dd7fbcf",
                "0x00000000000000000000000014fbca95be7e99c15cc2996c6c9d841e54b79425"
            ],
            "data": "0xff00000000000000000000000000000000000000000000000000000000000000",
            "blockNumber": "0x61f2cb",
            "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
            "transactionIndex": "0xb",
            "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47",
            "logIndex": "0xb",
            "removed": false
            },
        ],
        "logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000000...",
        "status": "0x1",
        "to": null,
        "transactionHash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef",
        "transactionIndex": "0xb"
        },
        "tx":
        {
        "blockHash": "0x613a6db7e0ec5c32920ef30ea239ddba34cb0c22a344b2c4c176ac11d0872c47...",
        "blockNumber": "0x61f2cb",
        "from": "0x387788908f8380536385cebdead4280a3919d0de",
        "gas": "0x53ec60",
        "gasPrice": "0x2cb417800",
        "hash": "0x8e6d53b645412953753961c5f9ffe51d63b28d386bd4ae9d79892e485efabcef...",
        "input": "0x6080604052660aa87bee538000624000005563095ea7b3600052732240dab907db71e64d",
        "nonce": "0x58",
        "to": null,
        "transactionIndex": "0xb",
        "value": "0x0",
        "v": "0x25",
        "r": "0x5ffc4da63f04cbd2efccd534a5cba30c73684fc925ecb3437b6b5e2b629acb8a",
        "s": "0x283ab7a6d1a69b80095723a4e60e9b61a3a1fa2ea72a11aafaebef2b6c9ea837"
        }
    ],
}

The Get Contract Object

Get an Ethereum contract.

Noteworthy Attributes

Attribute Description
apiKey This is your API Key.
gatewayId This gateway ID to be used for this call.
address The wallet address to locate.

Get Contract

Get contract.

HTTP Request

GET
https://longhorn.bullpay.com/api/GetContracts/{gatewayId}/{start}/{count}

Stay in the loop

Sign up for the BullPay newsletter with product updates, event information, special offers and more. (You can unsubscribe at a later time).

This site uses cookies

By continuing to use this site, you are agreeing to our use of cookies.
See Privacy Policy.

We are excited to announce a fresh new redesign of Google Trends!

We have added new features and simplified our navigation to make it easier to explore data based stories.