User Tools

Site Tools


daemon:api



Siad API

The Sia Daemon provider API routes for all of its modules. Documentation for each module's API routes are found in the Sia GitHub repository.

All Siad API calls return either JSON or no content.

A few important notes to keep in mind when working with the API are:

  • Requests must set their User-Agent string to contain the substring “Sia-Agent”.
  • By default, siad listens on “localhost:9980”. You can change this by using the –api-addr flag when running siad.
  • You should not bind or expose the API to a non-loopback address unless you are aware of the possible dangers.

Example GET curl call:

curl -A "Sia-Agent" "localhost:9980/wallet/transactions?startheight=1&endheight=250"

Example POST curl call:

curl -A "Sia-Agent" --data "amount=123&destination=abcd" "localhost:9980/wallet/siacoins"

Sources:

daemon/api.txt · Last modified: 2017/10/16 10:40 by Fornax