Skip to main content

Instrument

instrument is the atomic financial units in Fig Framework. Instruments are combined to create product. Under the hood, Fig catalogues and standardizes instrument from various cefi and defi venues with heterogenous liquidity and attribute.

Liquidity and trading integration for each instrument are provided in Fig's custodial solution.

Get Started - Examples

All instrument can be looked up via an unique identifier called instrumentId which is composed of the instrument's various attributes.

Deriving an instrumentId is simple. It is the string concatenation of the following attributes of an instrument:

  1. expirationDate as of 0:00:00 UTC time of date in unix timestamp format in seconds.
  2. instrumentType ID
  3. underlyingAsset ID
  4. instrumentVenue ID
  5. strikePrice with no decimals.
note

Unexpiring instruments have expirationDate equal to 9_999_999_999 (10 digits).

note

Perpetual futures, spot, fixed income, or money market with no strike price have strikePrice equal to 0.

info

Ordering of the attributes matters! See examples below.

Example 1: Derive instrumentId

To look up a CallOption for Eth listed on Deribit that expires on December 30, 2022 with strike price of $5,000:

const instrumentId =
// December 30, 2022 0:00:00UTC time, in unix timestamp seconds, in string
String(Math.floor(new Date("2022.12.30").getTime() / 1000)) +
// CallOption's instrumentType ID
"1" +
// Eth's underlyingAsset ID
"2" +
// Deribit's instrumentVenue ID
"0" +
// strikePrice with no decimals
"5000";

console.log(instrumentId);

The instrumentId is:

Output
"16723584001205000";

Example 2: Get instrument details

Instrument Attributes

Different instrument have different attributes. For example: CallOption will have different attributes than spot.

Option Instruments

AttributeTypeDescription
instrumentId (Primary Key)StringComposite primary key, which is the hashed hex string of the concatenation of instrument type, location, venue, maturity date, and strike price (if any).
askIv or bidIv (options only)Number(options only) Implied volatility (iv) of the best ask / bid price on the orderbook of the venue.
bestAsk or bestBidNumberBest quoted bid or ask price on the orderbook of the venue that the instrument is traded on. Quote convention depends on venue. See Integrations for quoting conventions.
blockTradeCommissionNumberCommission in the amount of percentage in decimals for block trades of instrument at venue, if any.
contractSizeNumberNumber of underlying represented by one instrument contract. For example 10 contract size for a BTCUSD options contract means that each option contract tracks 10 BTCUSD price.
deltaNumber(options only) The change in the quote current price of the instrument as a result of $1 change in the price of the underlying.
gammaNumber(options only) The change in delta of the instrument as a result of $1 change in the price of the underlying.
instrumentTypeStringOne of the following: FUTURE, CALL, PUT, FIXEDINCOME, and MONEYMARKET.
issuanceTimestampNumberIssuance timestamp of the instrument at the venue where it is traded, in unix timestamp seconds.
lastUpdatedNumberUnix timestamp that the lastBid and lastAsk was updated.
lastObservedOrderbookPriceNumberLast price observed through the orderbook or AMM of the instrument at the venue.
makerCommissionNumberThe amount of maker's commission paid as a percentage of contract value quoted in decimals at the venue where the instrument is traded.
maturityTimestampNumberMaturity date of the instrument, if any, in unix timestamp seconds. Perpetual futures have maturity timestamp of 32503708800.
minTradeAmountNumberMinimum size order of the instrument at the specified venue.
orderbookDataStringJson stringified String of the orderbook data that is retrieved from the venue where the instrument is traded.
orderbookAskTotalVolumeNumberSum ask volume visible on the orderbook / AMM of the instrument traded at the venue.
orderbookBidTotalVolumeNumberSum bid volume visible on the orderbook / AMM of the instrument traded at the venue.
orderbookVolumeWeightedAskNumberVolume weighted ask price visible on the orderbook / AMM of the instrument traded at the venue.
orderbookVolumeWeightedBidNumberVolume weighted bid price visible on the orderbook / AMM of the instrument traded at the venue.
priceIndexStringThe underlying's price index for which to determine settlement price of a contract. For example, for BTC/USD option, the priceIndex is BTC in USD.
quoteCurrencyStringCurrency that the contract is quoted in. For example for ETH/USD perpetual futures, the quote currency is USD.
rfqBooleanUnused
rhoNumber(options only) The quote currency change in the price of the instrument per 1% change in the interest rate assumption in the pricing of an option.
settlementCurrencyString(derivative contracts only) The currency that the derivatives contract is settled in.
settlementPeriodString(Dated futures and options only) The periodicity that the instrument / contract will settle in. For example, month or perpetual.
strikeNumber(options only) Strike / exercise price of an option. For non-option instruments, the default is 0.
thetaNumber(options only) The quote currency change in the value of the instrument on a per-day basis due to time decay.
tick_sizeNumberThe minimum tick that the price of the instrument is quoted at the venue.
takerCommissionNumberThe amount of taker fee as a percentage of contract value quoted in decimals at the venue where the instrument is traded.
underlyingPriceNumber(derivative contracts only) The price of the underlying asset of the instrument as quoted at the venue.
vegaNumber(options only) The percentage change in the quote currency value of the instrument per 1% change in the underlying asset's implied volatility.
venueStringName of the venue where the instrument is traded at.
venueInstrumentIdNumberThe identifier number of the instrument at the venue where it is traded.
venueInstrumentNameStringIf specified, the name of the instrument in String format.