Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

API token generated from the Goldsky Dashboard. Pass as: Authorization: Bearer

Path Parameters

theme
string
required

The feed's theme, e.g. wallets.

dataset
string
required

The feed's dataset, e.g. balances or transfers.

Body

application/json
name
string
required

Lowercase letters, digits and single hyphens (no --, not ending in -backfill), at most 25 characters. Unique within the project across every feed, and its infrastructure names must not match another sync's.

Required string length: 1 - 25
Pattern: ^(?!.*--)(?!.*-backfill$)[a-z0-9-]+$
chains
string[]

Chains to sync, by Goldsky chain slug or dataset prefix; see GET /api/v1/feeds/{theme}/{dataset}/sync-chains. Defaults to the chains the feed serves (default: true there).

Minimum string length: 1
exclude_chains
string[]

Sync the default chains except these.

Minimum string length: 1
backfill
boolean
default:true

Backfill each wallet's history: the initial wallets and every wallet added later.

wallet_addresses
string[]

Wallets to watch from the start. More can be added with POST …/syncs/{name}/wallets.

An EVM address (0x plus 40 hex digits, stored lowercase) or a Solana address (base58, case-sensitive).

Minimum string length: 1
token_addresses
string[]

Only sync these tokens. Leave out to sync every token; a sync created without a token filter cannot add one later.

An EVM address (0x plus 40 hex digits, stored lowercase) or a Solana address (base58, case-sensitive).

Minimum string length: 1
secret_name
string

The destination database's secret (Postgres, MySQL or ClickHouse). Required unless webhook_url is set; with it, an optional httpauth secret whose headers are sent with each request.

Minimum string length: 1
webhook_url
string

Send rows to this URL instead of a database.

Minimum string length: 1
hosted_postgres
boolean

Make a new Goldsky Hosted Postgres database for this sync and sync to it, instead of secret_name or webhook_url. Needs a plan with Hosted Postgres. Its connection string is in this response only. If the sync's setup fails, the database is deleted with the rest of its setup, unless something else uses it by then.

table_name
string

The destination table. Defaults to feed_token_balances or feed_token_transfers.

Required string length: 1 - 100
Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
wallet_table
object

Read the wallets from this table in the project's own Postgres instead of wallet_addresses. Such a sync has no token filter, syncs only chains the Feeds API serves (feeds_api_serves in sync-chains), and, with backfill on, backfills each wallet whenever its row is added or updated.

Response

202 - application/json

Default Response

name
string
required
theme
string
required
dataset
string
required
chains
string[]
required

The chains the sync covers, by Goldsky chain slug.

backfill
boolean
required

Whether each wallet's history is backfilled when it is added, and an added chain's history for every wallet.

secret_name
string | null
required

The secret holding the destination database's credentials, or a webhook's auth headers.

created_at
string<date-time>
required
wallet_table
object | null
required

A table in the project's own Postgres that the sync reads its wallets from, in place of the wallets added through the API.

connection_string
string

The new database's connection string, with hosted_postgres only. Shown this once.