EOS Tribe avatar

Spectrum API - get_transaction endpoint available

eostribe

Published: 18 Oct 2019 › Updated: 18 Oct 2019Spectrum API - get_transaction endpoint available

Spectrum API - get_transaction endpoint available

spectrum.jpeg

EOS Tribe launched a beta version of it's web-socket streaming Spectrum API on Telos Testnet (https://www.telosfoundation.io/).

Telos Testnet Spectrum API web-socket endpoint: wss://testnet.telos.eostribe.io

This version currently supports subscriptions for get_actions, get_blocks and newly added get_transaction endpoints.

Below is the sample subscription message for get_transaction endpoint:

{
  "apikey":"test-api-key",
  "event":"subscribe",
  "type":"get_transaction",
  "data": {"account":"eosio"}
}

Fields description for get_transaction:

  • apikey - key for access and accounting, not using on testnet.[String]
  • event - type of event, there are two variants “subscribe” and “unsubscribe”. To subscribe necessary using "subscribe" value . This field is mandatory. [String].
  • type - type of endpoint. Required [String].
  • data - Contents of this object depends on type argument. Required for get_transaction.
  • account - name of account. Required [String].

Sample client in Python for get_transaction:

import json
import pprint

from websocket import create_connection

path="streaming"
url = "wss://testnet.telos.eostribe.io/"+path

data = {"account":"eosio"}

messageBody ={
   "apikey":"test-api-key",
             "event":"subscribe",
              "type":"get_transaction",
             "data": data
             }
ws = create_connection(url)
messageJson = json.dumps(messageBody)
ws.send(messageJson)

while True:
   pprint.pprint(json.loads(ws.recv()))
ws.close()

For get_actions and get_blocks - see our earlier post:

https://steemit.com/eosio/@eostribe/4kzs1q-spectrum-api-running-on-telos-testnet

Feel free to give it a try and provide your feedback at out Telegram channel: https://t.me/EOSTribe

Original post describing Spectrum API architecture: https://steemit.com/eosio/@eostribe/introducing-spectrum-streaming-api-for-eosio

EOS Tribe is committed to continue work on creating innovative solutions for EOSIO.

Leave Spectrum API - get_transaction endpoint available to:

Written by

Be as you are.

Read more #eosio posts


Best Posts From EOS Tribe

We have not curated any of eostribe's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From EOS Tribe