> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trdrs.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a provider's markets

> List every market a provider you connected states, add them to your catalog in one call, price them from your own connection, and trade them on the paper book in US dollars.

Add a liquidity provider's markets to your venue without writing each instrument by hand. Your
connection's provider states its symbol list, with each market's contract size, tick, lot sizes and
hours, and trdrs keeps each read of it as a reading. You see every market it states, add the ones you
want in one call, and your accounts trade them on the paper book, priced from your own connection, in
US dollars.

Use this page if you connected a provider that serves its symbol list, such as Bolsador through
[FXCubic](https://docs.trdrs.co/providers/fxcubic.md). By the end your accounts can trade its currency pairs and CFDs, and
you know what your risk policy must say for them.

> [!NOTE]
>
> Provider markets are a preview, served on the sandbox. A connection prices your markets once it is
> validated, and in production its provider version must be one trdrs has qualified.

## Read the provider's markets

trdrs reads the list when your connection is validated. Read it again whenever the provider's sheet
changes:

```bash theme={null}
curl -X POST "$TRDRS_API_BASE_URL/api/venues/$VENUE/connections/$CONNECTION/markets/read" \
  -H "Authorization: Bearer $TRDRS_VENUE_KEY" \
  -H "Idempotency-Key: read-$(date +%s)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

The response is the new `reading`: its `id`, the list's own `listId`, the digest of what was read,
when, and how many markets it lists. A reading never changes; each read is a new one.

Then list its markets, 500 to a page:

```bash theme={null}
curl "$TRDRS_API_BASE_URL/api/venues/$VENUE/connections/$CONNECTION/markets" \
  -H "Authorization: Bearer $TRDRS_VENUE_KEY"
```

Each market shows:

* `providerSymbol` and `terms`: the market as the provider states it, with its evidence.
* `symbol` and `name`: what it lists under. A currency pair is `FX:` and the provider's symbol
  (`FX:EURUSD`); the rest are `INDEX:`, `METAL:`, `ENERGY:`, `COMMODITY:` or `CRYPTO:`. The prefix
  names the market, not the provider, so your traders keep their symbols if you change where a
  market is priced.
* `addable`, and `refusal` with the term concerned where it can't be added: an equity or a bond,
  which the paper book has no CFD terms for, a term no evidence covers, or more than one tick band.
* `venueStates`: what your add must state because the provider states none: `quantityMax`, the
  largest order, and `orderTypes` and `timeInForce` for a market the provider quotes without filling.
* `listed`: the listing you already hold of it from this connection, and whether it's active.

## Add them

Add every market a reading can list, or the ones you name, and activate them in the same call:

```bash theme={null}
curl -X POST "$TRDRS_API_BASE_URL/api/venues/$VENUE/connections/$CONNECTION/markets" \
  -H "Authorization: Bearer $TRDRS_VENUE_KEY" \
  -H "Idempotency-Key: add-bolsador-1" \
  -H "Content-Type: application/json" \
  -d '{"readingId":"...","markets":"all","activate":true,
       "orderTypes":["market","limit","stop"],"timeInForce":["gtc","day"],"quantityMax":"50"}'
```

To add only some, send `markets` as a list of `{ "providerSymbol": "EURUSD" }`, each with a `symbol`
and `name` of your own where you want another. Each market becomes an instrument candidate on the
reading's terms:

* counted in lots of the provider's contract size, on its tick, lot minimum and step, and its hours;
* mapped to your connection under the provider's symbol and priced from your connection's own price
  source, `provider:<connectionId>:provider-market`;
* bound to the contract the provider states at that reading, which the paper book fills it on.

You state only what is yours: the order forms you offer, how old a price may be (`maxAgeMs`, 2,000
where you state none), and the largest order where the provider states none. Narrow anything else
through your [conditions](https://docs.trdrs.co/guides/run-a-venue.md). Each market answers the candidate it made or found,
its activation, or why it wasn't added, and the rest are added. Sending the same add again adds
nothing again.

A candidate you write yourself can name a reading too: set `contractVersion` to
`provider-reading:<readingId>`. Its market terms must then be the reading's, or it's refused
`409 terms_differ_from_provider` with the `field` that differs.

## Price and convert in dollars

Your accounts hold US dollars. A pair's profit arises in its quote currency, and its margin in its
base currency, so each converts to dollars at the live rate your own connection quotes. The add's
answer names, in `conversions`, the route your risk policy needs for each currency other than US
dollars:

```json theme={null}
{ "asset": "JPY", "route": [{ "base": "USD", "quote": "JPY", "sourceId": "provider:<connectionId>:provider-market" }], "providerSymbol": "USDJPY" }
```

Put each route in your policy's conversion term, and keep the pair it reads listed and active. Your
policy's FX/CFD class names each market by its symbol (`FX:USDJPY`), with its margin, markup and
financing. A yen profit is then booked in yen and posted in dollars at the side of the rate worse for
the account, at the quote in force when the position closes. Your accounts' market lists show each
market under the provider that states it, Bolsador for a Bolsador market.

## Know the limits

* Your connection's prices are your venue's alone: no other venue's accounts read them. A trader who
  holds an account at your venue charts a market by its symbol on them, live only, since the provider
  serves no price history; a trader holding accounts at two venues that list one symbol from two
  sources sees no chart of it.
* A market is priced only while your connection is validated, and only inside the hours the
  provider states. Past the dates its calendar covers, its hours are unknown and it doesn't trade.
* A market the provider quotes without filling trades on the paper book alone; no external route
  reaches it.
* A provider's later reading is a new contract version. Relisting a market from it is a change to an
  active instrument, which waits until no account holds it.

## Next steps

* [Run a venue](https://docs.trdrs.co/guides/run-a-venue.md) for conditions, routes and groups.
* [Provider conformance](https://docs.trdrs.co/providers/provider-conformance.md#serve-your-symbol-list) for what a provider
  states in its symbol list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.