Skip to main content

Symbols

Every instrument is named VENUE.code. The venue is the exchange code; the rest is veinmesh's canonical form, even where the exchange writes something else. The shape belongs to the venue, not to the product as a whole.

Symbols resolve as of a date: the same spelling can point to different contracts in different years, so pass as_of when it matters.

Futures​

For the mainland futures venues, a dated future is the product plus a four-digit year-month:

  • SHFE.rb2701: rebar, January 2027 delivery;
  • CZCE.AP2610: apple, October 2026. The exchange writes AP610; the canonical form always uses four digits, and AP610 is an alias valid while that contract trades;
  • DCE.l2602F: the letter suffix is kept where the exchange lists a second contract for the same month.

A product without a month is VENUE.product, for example SHFE.rb.

Other venues use their own month formats. Do not apply the four-digit rule to a venue that does not use it; ask the catalog for the instrument.

Options​

An option on a futures venue is the underlying series, C or P, and the strike without trailing zeros:

  • SHFE.rb2701-C-3000;
  • DCE.a2611-MS-C-4250: a second option series keeps the exchange's series tag.

Exchange-listed equity options use the exchange's numeric code, for example SSE.10011425. The underlying, strike and right are fields of the instrument returned by the catalog, so you do not have to parse the code.

Stocks, ETFs, funds and indices​

These use the exchange's code: SSE.600000 for a stock, SZSE.159915 for an ETF, SSE.000300 for an index. A fund or index can be in the catalog with no published dataset; see Data coverage.

Exchange combos​

A combo is VENUE.<type>.<leg>&<leg>, with each leg written without the venue prefix and in the exchange's order, for example DCE.SP.a2611&a2701.

Continuous futures​

A continuous contract stands for a series of dated contracts:

  • SHFE.rb.main is the main contract;
  • SHFE.rb.c1, .c2, … are the first, second, … listed contracts by expiry, counting from the nearest;
  • .c1 through .c12 are defined.

For the mainland futures venues served today, main is the contract with the largest open interest at the previous trading day's close; the previous main carries on while it is still listed. Treat this as the rule of those markets, not as a universal definition.

Continuous K-lines report the actual contract in contract. Use adjust=diff or ratio to back-adjust prices across rolls; the most recent segment keeps real prices. Continuous contracts take from_day and to_day, not instants.

Aliases and identity​

Exchange spellings such as CZCE's three-digit year can be used as aliases and are resolved by date. Two instruments matching one spelling on one day answer ambiguous_symbol (409).

Use instrument_id in your own tables: it never changes and is never reused. Use symbol for display and in requests.