Publish your own data feed

Push any number from your own code and read it live on your charts, alerts and Indicators. Name the feed on the Sell tab, get a push key, push readings over HTTPS, and sell it if you like.

A feed is a number your own code pushes to OpenMarket: an air quality index, a funding spread you compute, the balance of a wallet, anything with a value and a time. OpenMarket keeps the history and serves it; charts, alerts and Indicators read it live, and you decide who else can: nobody, everyone, the members of a room you own, or subscribers who pay you.

How a feed works: your code pushes rows with its push key, OpenMarket keeps the feed and serves it, and your charts, everyone or members, or paying subscribers read it.value = 87POST rowsevery houryour codea cron job, a script, a server[time, value]@you/aqi-shanghaiyour feedone number, kept and servedyour chartsand alertseveryone, ormembers$subscribersthey pay youyou push; OpenMarket keeps the history; readers add the feed to a chart like any indicator

You do not install anything. You name the feed in the app, OpenMarket gives you a push key, and your own code (a cron job, a script, a server) pushes readings to one HTTPS address.

What you need

  • A signed-in OpenMarket account. A private or public feed is free on every plan.
  • Free keeps one reading an hour and up to 25 feeds. Push more often if you like: the readings inside an hour fold into one, the last.
  • Selling needs Plus: one reading a minute, 250 feeds, and listings for subscribers. Plus is part of OpenMarket+, $35 a month. Pro and Business add second-by-second feeds.

The flow at a glance

The five screens: Name, Readers, then Price and Get paid only for a feed sold to subscribers, then Review; the live screen after it shows the push key once.Nameaddress, cadenceReaderswho can read itPricefrom $2.50Get paidStripe, onceReviewterms, publishonly when you choose Subscribersyour push key,shown onceOnly me, Everyone, Members: three screens, no price

Click your avatar, open Marketplace, then Sell. The seller screen shows the A feed card beside the Indicator pitch. Click Publish a feed. If you already sell, the same button sits at the top of Your feeds.

The Sell tab with the A feed card and its Publish a feed button

Step 1: Name your feed

The Name your feed screen, sketched: the address readers use and keep, the title the legend shows, the cadence that sets live, lagging and stale, and Continue.1 of 3Name your feedone number, pushed by your own codeName@you/aqi-shanghaiTitleShanghai air qualityHow often you push1 m5 m15 m30 mHourlyDailyContinueNamereaders' address, fixed once setTitlethe legend's label, editableHow oftensets live, lagging, stale
  • Name is the last part of the feed's address, which readers see as @<your-username>/<name>: lowercase letters, digits and dashes. It is fixed once the feed is published, so pick it with care.
  • Title is what people read in the legend and on the feed's page. You can change it later.
  • How often you push: every minute, 5, 15 or 30 minutes, hourly, daily, or irregular. Charts use it to show whether the feed is live, lagging or stale.
  • Unit is optional: AQI, %, USD.

The name is checked before anything is created. A name you already use, or one taken on the OpenMarket registry, is refused here, not after the fact.

Step 2: Choose who can read it

The Who can read it screen, sketched: Only me, Everyone (chosen), Members, Subscribers; the first three are free, Subscribers needs Plus.2 of 3Who can read it?@you/aqi-shanghaiOnly meprivate: your charts and alertsEveryonepublic and free, anyone can add itMembersa room or space you ownSubscribersfor sale: readers pay monthly or onceSubscribers needs Plus; the other three are free
ReadersWho reads itCost to you
Only mePrivate. Your own charts and alerts.Free
EveryonePublic and free. Anyone can add it to a chart.Free
MembersThe members of a room or space you own. Paste its id.Free
SubscribersFor sale. Readers pay monthly or once.Plus

Selling a feed. Choose Subscribers, then set the price on the next screen: Monthly or One-time, from $2.50 up. The screen shows what you get per sale after OpenMarket's 20% fee (at least 50 cents). Payouts run through Stripe, which you connect once in Get paid. You can list the feed before Stripe has finished checking your details (List it now): readers see Not for sale yet until your payouts are ready, and sales open on their own after that.

Step 3: Review and publish

The Review screen repeats the feed's address, cadence and readers. Agree to the registry terms (and the marketplace terms when you sell), then press Publish feed, or List it for a feed with a price.

Step 4: Keep your push key

The live screen, sketched: the feed is live, the push key card shows the key once with Copy key; a lost key is replaced from Your feeds with Rotate push key.@you/aqi-shanghai is livepublic and free; anyone can add it to a chartYour push keyit opens this one feed, nothing else; shown onceomfd_a9Qk2mZtR8Xp1LcV4nHs7Bq…Copy keyShown oncecopy it to your code's secrets nowLost it?Your feeds > Rotate push key mints a new one

The live screen shows Your push key once. It starts with omfd_ and opens this one feed, nothing else. Click Copy key and store it where your code can read it (an environment variable, a secrets manager). Nobody at OpenMarket can show it to you again.

Lost it? Open Your feeds, find the feed, and choose Rotate push key from its menu. A new key is minted and the old one stops working at once.

Step 5: Push readings from your code

One push: a POST to the feed's address with the push key as the bearer and rows of time and value; the chart updates; up to 2,000 rows and 64 KB a push, retries carry the same idempotency key, 401 is a wrong key and 429 asks you to wait.POST relay.openmarket.xyz/api/v2/feeds/@you/aqi-shanghai/rowsAuthorization: Bearer omfd_a9Qk…{"rows": [[1762000000, 87]]}the feed's addressyour push keytime, valueone push, from anywhere with curlaqi-shanghai87 AQIthe chart updatesup to 2,000 rowsand 64 KB a pushretry with the samex-om-idempotency-key401: wrong key429: wait Retry-After

The live screen also shows a ready-to-run curl with your key and address filled in. This is the whole contract:

Code
curl -X POST "https://relay.openmarket.xyz/api/v2/feeds/@you/aqi-shanghai/rows" \
  -H "Authorization: Bearer omfd_YOUR_PUSH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rows": [[1762000000, 87]]}'
  • A row is [time, value]: the time in seconds since 1970 (UTC), the value a plain number. Several rows in one push are fine, oldest first.
  • One push holds up to 2,000 rows and 64 KB.
  • Readings inside one bucket of your plan's floor fold into one, the last: an hour on Free, a minute on Plus, a second on Pro and Business.
  • Retrying a push after a network error? Send the same x-om-idempotency-key header (1 to 80 letters, digits, _, ., : or -) and the feed keeps one copy.
  • A wrong or rotated key answers 401. Too many pushes in a short time answer 429 with a Retry-After header: wait that many seconds and send again.

The live screen waits for your first reading and shows its state, age and value as soon as it lands. From then on the feed's state follows your cadence:

Feed states as time passes since the last reading: live, lagging after two cadences, stale after ten, offline after a long silence; the next push makes it live again.last reading2 cadences10 cadenceslivelaggingstaleofflinea long silencethe next push makes it live againan hourly feed: live 2 h,lagging to the 10th, then stale

A cron job, for example

Code
#!/bin/sh
value=$(curl -s "https://example.org/api/aqi?city=shanghai" | jq '.aqi')
curl -s -X POST "https://relay.openmarket.xyz/api/v2/feeds/@you/aqi-shanghai/rows" \
  -H "Authorization: Bearer $OM_FEED_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"rows\": [[$(date +%s), $value]]}"

Run it every hour and the chart draws one point per hour.

From a script or an agent

The app is not required. Your own code, or an agent reading this page, can create the feed and push to it with two calls. The only thing it needs is an API key: in the app, open your avatar, Settings, API, and press New key. The key stands for you, so the feed is created under your username.

Using an agent? Paste this into it, with your key and your names filled in:

Code
Read https://openmarket.xyz/learn/feeds/publish-a-feed.md and follow its section "From a script or an agent".
My OpenMarket API key: <paste it here>
Create a private feed named <name> with the title "<title>", cadence hourly, unit <unit>.
Keep the push key from the answer, push one test reading now, then show me the curl a cron job should run every hour.

Or do it by hand:

Code
# 1. Declare the feed (create). The answer is 201 with the push key in "token": it is shown once.
curl -X PUT "https://relay.openmarket.xyz/api/v2/feeds/@you/aqi-shanghai" \
  -H "Authorization: Bearer $OM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Shanghai air quality", "cadence_s": 3600, "units": "AQI", "visibility": "public"}'

# 2. Push readings with that token (the same call as above).
curl -X POST "https://relay.openmarket.xyz/api/v2/feeds/@you/aqi-shanghai/rows" \
  -H "Authorization: Bearer $OM_FEED_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rows": [[1762000000, 87]]}'
  • title is required (up to 80 characters). cadence_s is required: one of 0 (irregular), 60, 300, 900, 1800, 3600, 14400, 86400, 604800. units is optional (up to 16 characters).
  • visibility is private (default), public, or members with "members_of": {"kind": "room", "id": "..."} for a room or space you own. Selling stays in the app: a listing needs the Sell tab's price and payout steps.
  • The same PUT later updates the title, units or visibility and answers 200 without a token. PUT with ?rotate=1 and the body {} mints a new token and stops the old one. DELETE on the feed's address removes it for good, and the name cannot be used again.
  • A name you already use answers the update, not a new feed; a name taken on the registry is refused.

For an agent, hand it this page as text: https://openmarket.xyz/learn/feeds/publish-a-feed.md. Every guide has such a mirror, and https://openmarket.xyz/learn/llms.txt lists them all.

Reading a feed on a chart

Readers find your feed by its name in super search (Ctrl/Cmd+K) or open its page from the link you share. The Indicators dialog shows the feed's provider, cadence, units, history and a 30-day record (uptime, median lag, installs), then Add puts it on the chart. A paid feed shows its price there and readers subscribe in place. On the chart, the legend shows the feed's title, the provider (your username) and when it last updated, and a chip says lagging, stale or offline when your pushes fall behind.

Manage your feeds

Your feeds in the Seller Hub: the feed's cadence, state, last reading, readers and price

Your feeds in the Seller Hub lists every feed with its cadence, state, last reading, readers and price. The menu on each row offers:

  • Stop sales and Resume sales: nobody new can subscribe while sales are stopped; current subscribers keep reading until their period ends.
  • Make it free: closes the listing and makes the feed public. While subscribers remain, stop sales first and press it again once their periods end.
  • Rotate push key: a new key, the old one stops at once.
  • Delete feed: permanent, and the name cannot be used again. A feed with a listing must be made free first.

A listed price cannot be changed yet.

Plans and limits

FreePlusProBusiness
Readings kept perhourminutesecondsecond
Feeds25250250250
Second-by-second feeds001050
History kept50,000 readings90 days7 days7 days
Sell feedsnoyesyesyes

A feed keeps its newest readings up to the history cap; past it, the oldest readings go first.