DOCS

Developer documentation

Explore streamd, accounts, transactions and JavaScript APIs. Search titles and full text to find what you need.

Docs

streamd-apis

Docs

WebSocket and JSON-RPC APIs

If you want to communicate directly with the streamd server, you can use the WebSocke…

Docs

API Changes

The WebSocket and JSON-RPC APIs are still under development and subject to change.

Docs

STREAMD

Docs

streamd-apis

STREAMDWEBSOCKET AND JSON-RPC APIAPI changesConnect streamdReason for running persona…

Docs

STREAMD

The core peer-to-peer server that runs the Stream network is called streamd. Each str…

Docs

WebSocket and JSON-RPC APIs

To communicate directly with a streamd server, use the WebSocket API or JSON-RPC API.…

Docs

API Changes

WebSocket and JSON-RPC APIs are still under development and are subject to change.

Docs

Request Format

Both the WebSocket API and JSON-RPC use JSON for requests and responses. Methods and …

Docs

Response Format

Successful response example { "id": 2, "status": "success", "type": "response", "resu…

Docs

Connecting to streamd

Before sending any commands to a streamd server, you need to know which server to con…

Docs

Why Run Your Own streamd Server?

There are many reasons to run your own streamd server. In general, you can trust your…

Docs

WebSocket API

Docs

JSON-RPC

You can use any HTTP client (such as Poster for Firefox or Postman for Chrome) submit…

Docs

Command-Line Interface

Command line and JSON-RPC connect to the same service, so the public server and serve…

Docs

WebSocket API

If you are trying something on the Stream ledger, you can skip writing your own WebSo…

Docs

Error Responses

It is almost impossible to enumerate all the ways in which errors can occur. Some may…

Docs

Caution When Sharing Errors

When your request results in an error, the entire request is logged in the background…

Docs

Universal Errors

All methods may return the following error code values: unknownCmd - The request does…

Docs

Format Conventions

WebSocket and JSON-RPC APIs generally take the same parameters, albeit in different w…

Docs

Unique Identifiers

Different types of objects can be identified in different ways: Accounts can be ident…

Docs

Specifying a Ledger

Many API methods require you to specify a ledger instance that includes the correct d…

Docs

Specifying Currency Amounts

Docs

Specifying Time

Docs

Possible Server States

Docs

Markers and Pagination

Docs

Modifying the Ledger

All changes to Stream’s global shared ledger are the result of transactions. The only…

Docs

API Methods

WebSocket and JSON-RPC API methods are defined based on command names and are divided…

Docs

Public Commands

account_currencies - Get the list of currencies that the account can send or receive …

Docs

Administrative Commands

The streamd management command is only available when connecting on a host and port i…

Docs

Command-Line Access

You can use the streamd application (as a standalone instance) as a JSON-RPC client. …

Docs

Account Information

The "accounts" in the Stream ledger represent STM holders and transaction senders. Ac…

Docs

account_info

The account_info command will retrieve information about the account, its activity an…

Docs

account_lines

The account_lines method returns information about the account's trust lines, includi…

Docs

account_offers

The account_offers method retrieves a list of offers by a specific account as a speci…

Docs

account_tx

The account_tx method retrieves a list of transactions involving the specified accoun…

Docs

wallet_propose

Use the wallet_propose method to generate the keys required for the new account. Acco…

Docs

Basic Data Types

Different types of objects are uniquely identified in different ways: Accounts are di…

Docs

Addresses

Each account in the Stream ledger is identified by an address in base58 encoding form…

Docs

Hashes

In Stream, especially the transactions and ledgers, they are uniquely determined by a…

Docs

Account Sequence Numbers

A serial number is a 32-bit unsigned integer that identifies a transaction or offer r…

Docs

Ledger Index

The ledger index is a 32-bit unsigned integer used to identify the ledger. The ledger…

Docs

Specifying a Ledger

Many API methods require you to specify a ledger instance that includes the correct d…

Docs

Currencies

There are two different currencies in Stream: stm and others. There are many differen…

Docs

Specifying Currency Amounts

Some API methods require you to specify a monetary amount. The specified style depend…

Docs

Currency Codes

There are two currency codes in the STM ledger:Three-character currency codes. Upperc…

Docs

Specifying Time

streamdThe server and its API represent times as unsigned integers. Measured as the n…

Docs

Possible Server States

Depending on how the streamd server is configured, running time, and other factors, a…

Docs

account_currencies

The account_currencies command retrieves a list of currencies that an account can sen…

Docs

account_channels

(need to enable PayChan amendment) The account_channels method returns information ab…

Docs

Ledger Information

Each streamd server maintains a complete copy of the current state of the STM ledger,…

Docs

ledger

Retrieve information about the public ledger. Example of request format: { "id": 14, …

Docs

ledger_closed

The ledger_closed method returns the unique identifier of the most recently closed le…

Docs

ledger_current

The ledger_current method returns the unique identifier of the currently ongoing ledg…

Docs

ledger_data

The ledger_data method retrieves the contents of the specified ledger. You can loop t…

Docs

ledger_entry

The ledger_entry method returns a single ledger object from the STM ledger in raw for…

Docs

ledger_request

The ledger_request command tells the server to obtain a specific ledger version from …

Docs

ledger_accept

The ledger_accept method forces the server to close the current working ledger and mo…

Docs

Transaction Management

Transactions are the only way to modify the shared state of the STM ledger. All activ…

Docs

tx

The tx method retrieves information for a single transaction. Example of request form…

Docs

transaction_entry

The transaction_entry method retrieves information for a single transaction from a sp…

Docs

tx_history

The tx_history method retrieves some recent transactions. Warning: This method is dep…

Docs

path_find

WebSocket API only! The path_find method finds possible payment paths and sends perio…

Docs

path_find: Create

The create subcommand path_find creates a persistent request to find possible paths t…

Docs

path_find: Close

path_find subcommand close instructs the server to stop sending information about cur…

Docs

path_find: Status

Requests an immediate update of the path_find subcommand status for the client's curr…

Docs

sign

sign method takes a transaction and key in JSON format and returns a signed binary re…

Docs

Auto-Filled Fields

If you omit them, the server will automatically try to autofill certain fields in tx_…

Docs

vstream_path_find

The vstream_path_find method is a simplified version of path_find that can be used ou…

Docs

submit

The submit method applies the transaction and sends it to the network for confirmatio…

Docs

Submit-Only Mode

The submission request contains the following parameters:FieldTypeDescriptiontx_blobS…

Docs

Sign-and-Submit Mode

This mode signs the transaction and commits it immediately. This mode is intended for…

Docs

book_offers

The book_offers method retrieves a list of quotes between two currencies, also known …

Docs

Subscriptions

When using subscriptions, you can have the server push updates to the client when var…

Docs

subscribe

The subscribe method requests the server to send periodic notifications when certain …

Docs

Ledger Stream

The ledger flow only sends ledgerClosed messages when the consensus process declares …

Docs

Transaction Streams

Many subscriptions result in messages about transactions, including the following:The…

Docs

Peer Status Stream

The administrator-only peer_status stream reports a wealth of information about strea…

Docs

unsubscribe

The unsubscribe command tells the server to stop sending messages for a specific subs…

Docs

Server Information

There are also commands that can retrieve information about the current status of the…

Docs

server_info

The server_info command requests a human-readable version of various information from…

Docs

server_state

The server_state command asks the server for various machine-readable information abo…

Docs

can_delete

With the online_delete and advisory_delete configuration options enabled, the can_del…

Docs

consensus_info

The consensus_info command provides information about the consensus process for debug…

Docs

fetch_info

The fetch_info command returns information about the objects this server is currently…

Docs

feature

The feature command returns information about the modifications that the server is aw…

Docs

get_counts

The get_counts command provides various statistics about the health of the server, ma…

Docs

ledger_cleaner

The ledger_cleaner command controls the Ledger Cleaner, an asynchronous maintenance p…

Docs

log_level

The log_level command changes the logging verbosity of the streamd server, or returns…

Docs

logrotate

The logrotate command closes and reopens the log file. This is intended to aid log ro…

Docs

validation_create

Use the validation_create command to generate the Streamd validator key. Similar to t…

Docs

validation_seed

The validation_seed command temporarily sets the secret value used by streamd for sig…

Docs

peers

The peers command returns streamd a list of all other servers currently connected to …

Docs

print

The print command returns the current status of various internal subsystems, includin…

Docs

Utility Methods

streamdThe server also provides some commands purely for convenience.

Docs

ping

The ping command returns a confirmation so that clients can test connection status an…

Docs

random

The random command provides a random number that is used as a source of entropy for c…

Docs

json

The json method is a proxy for running other commands and accepts the parameters of t…

Docs

connect

The connect command forces the streamd server to connect to a specific peer streamd s…

Docs

stop

Gracefully shut down the server. This stop request is an administrative command that …

Docs

novstream_check

The novstream_check command provides a quick way to check the status of an account's …

THE NEXT CONNECTION

Your next connection starts here.

Join the Stream community. Explore a connected world of value.

Get in touch