TAAL Transaction Endpoints

The simplest way to broadcast transactions to BSV is to use the broadcast and the batchBroadcast endpoints. /api/v1/broadcast expects a single transaction whilst /api/v1/batchBroadcast expects a batch of them.

With both of these it is possible to send your request as text with the application/json mimetype or binary with the application/octet-stream mimetype (discussed below).

The binary format has 2 advantages:

  1. The size of the request payload is half of the text equivalent.

  2. Unlike with JSON, the 1st transaction in the binary stream can be processed before the entire payload has been received.

The endpoints are:

curl -X POST https://api.taal.com/api/v1/broadcast
curl -X POST https://api.taal.com/api/v1/batchBroadcast

Please note that these endpoints require a Taal APIKey that can be obtained for free by registering at https://platform.taal.com

/api/v1/broadcast (application/json)

Request body

{
  "rawTx": "bitcoin transaction in hex..."
}

Response, if successful:

201 Created
text/plain
<32 byte TXID in 64 hexadecimal characters>

Response, if not successful

These are the exact responses returned by the bitcoin node.

/api/v1/broadcast (application/octet-stream)

Request body

Response, if successful:

/api/v1/batchBroadcast (application/json)

Request body

/api/v1/batchBroadcast (application/octet-stream)

Request body

Response for both text and binary requests:

The resultDescription contains the exact responses returned by the bitcoin node for each transaction.


Last updated

Was this helpful?