Pyth
Search…
Product Metadata
Product accounts store metadata about a product. This metadata is represented as a set of reference attributes, stored as a list of text key/value pairs but not all products share the same account structure.
Every product has product_account, symbol, asset_type, quote_currency, base and price_account. However, the remaining fields of a product account will depend on its asset_type.
Equity
As a rule, all products with asset_type = Equity will follow the below Product Account structure:
1
product_account... Solana Account
2
symbol.......... AssetType.Country.BaseCurrency/QuoteCurrency
3
asset_type...... AssetType
4
quote_currency.. QuoteCurrency
5
description..... Description
6
base............ BaseCurrency
7
country......... Country
8
cms_symbol...... NYSESymbol
9
cqs_symbol...... SIPSSymbol
10
nasdaq_symbol... ComstockSymbol
11
price_account... Solana Account
Copied!
symbol: AssetType.Country.BaseCurrency/QuoteCurrency where the base: BaseCurrency is, in order of availability:
  1. 1.
    cms_symbol: NYSESymbol
  2. 2.
    cqs_symbol: SIPSSymbol
  3. 3.
    nasdaq_symbol: ComstockSymbol
Here is a snapshot of the Apple product account:
1
product_account .. G89jkM5wFLpmnbvRbeePUumxsJyzoXaRfgBVjyx2CPzQ
2
symbol.......... Equity.US.AAPL/USD
3
asset_type...... Equity
4
quote_currency.. USD
5
description..... APPLE INC
6
base............ AAPL
7
country......... US
8
cms_symbol...... AAPL
9
cqs_symbol...... AAPL
10
nasdaq_symbol... AAPL
11
price_account... CqFJLrT4rSpA46RQkVYWn8tdBDuQ7p7RXcp6Um76oaph
Copied!
Crypto
As a rule, all products with asset_type = Crypto will follow the below Product Account structure:
1
product_account .. Solana Account
2
symbol.......... AssetType.BaseCurrency/QuoteCurrency
3
asset_type...... AssetType
4
quote_currency.. QuoteCurrency
5
description..... Description
6
generic_symbol.. JLQDSymbol
7
base............ BaseCurrency
8
price_account .. Solana Account
Copied!
Here is a snapshot of the Luna product account:
1
product_account .. 25tCF4ChvZyNP67xwLuYoAKuoAcSV13xrmP9YTwSPnZY
2
symbol.......... Crypto.LUNA/USD
3
asset_type...... Crypto
4
quote_currency.. USD
5
description..... LUNA/USD
6
generic_symbol.. LUNAUSD
7
base............ LUNA
8
price_account .. 8PugCXTAHLM9kfLSQWe2njE5pzAgUdpPk3Nx5zSm7BD3
Copied!
Foreign Currency & Metal
Lastly, are Foreign Currencies (FX) and Metal assets. Those 2 asset_type share a common product account structure that follows the below template:
1
product_account .. Solana Account
2
symbol.......... AssetType.BaseCurrency/QuoteCurrency
3
asset_type...... AssetType
4
quote_currency.. QuoteCurrency
5
description..... Description
6
generic_symbol.. JLQDSymbol
7
base............ BaseCurrency
8
tenor........... Maturity
9
price_account .. Solana Account
Copied!
Here is a snapshot of the Japanese Yen product account:
1
product_account .. CiTV5gD8G53M1EQdo32jy5riYRU8fMFSVWC5wJj3vjcr
2
symbol.......... FX.USD/JPY
3
asset_type...... FX
4
quote_currency.. JPY
5
description..... USD/JPY
6
generic_symbol.. USDJPY
7
base............ USD
8
tenor........... Spot
9
price_account .. 3CVi3EEprs1zeKhv5kw9EpRDv1hNfvpunQ98gex27Prd
Copied!
Best Practices
The users should not rely on the symbol name being unchanging or parse data out of the symbol.
Instead, programs should always use the different attributes to identify the product you are interested in. You have to ensure that anything which is used to compose the symbol is made available as a stand-alone attribute.
Caveats
We’re limited to 464 bytes to store the attribute dictionary in v2 (the product account is 512 bytes and 48 are used for other fields). This has to hold all the keys and values, plus field separators. There is no data compression or abbreviation.
Copy link