Skip to content

Commit

Permalink
reorg market type
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed Feb 1, 2022
1 parent 6e74b20 commit d7a121e
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions wiki/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,27 +734,27 @@ Each currency is an associative array (aka dictionary) with the following keys:
{
'id': 'btcusd', // string literal for referencing within an exchange
'symbol': 'BTC/USD', // uppercase string literal of a pair of currencies
'base': 'BTC', // uppercase string, unified base currency code, 3 or more letters
'quote': 'USD', // uppercase string, unified quote currency code, 3 or more letters
'baseId': 'btc', // any string, exchange-specific base currency id
'quoteId': 'usd', // any string, exchange-specific quote currency id
'settle': 'USDT' // the unified currency code that the contract will settle in, only set if `contract` is true
'settleId': 'usdt' // the currencyId of that the contract will settle in, only set if `contract` is true
'type': 'spot' // spot for spot, future for expiry futures, swap for perpetual swaps, 'option' for options
'active': true, // boolean, market status
'type': 'spot', // spot for spot, future for expiry futures, swap for perpetual swaps, 'option' for options
'linear': true, // the contract is a linear contract (settled in quote currency)
'inverse': false, // the contract is an inverse contract (settled in base currency)
'contractSize': 1, // the size of one contract, only used if `contract` is true
'spot': true, // whether the market is a spot market
'margin': true, // whether the market is a margin market
'swap': false, // whether the market is a perpetual swap
'future': false, // whether the market is a expiring future
'swap': false, // whether the market is a perpetual swap
'option': false, // whether the market is an option contract
'active': true, // boolean, market status
'strike': 4000, // price at which a put or call option can be exercised
'optionType': 'call', // call or put string, call option represents an option with the right to buy and put an option with the right to sell
'contract': false, // whether the market is a future, a perpetual swap, or an option
'taker': 0.002, // taker fee rate, 0.002 = 0.2%
'maker': 0.0016, // maker fee rate, 0.0016 = 0.16%
'linear': true // the contract is a linear contract (settled in quote currency)
'inverse': false // the contract is an inverse contract (settled in base currency)
'contractSize': 1 // the size of one contract, only used if `contract` is true
'expiry': 1641370465121 // the unix expiry timestamp in milliseconds, undefined for everything except market['type'] `future`
'expiryDatetime': '2022-03-26T00:00:00.000Z' // The datetime contract will in iso8601 format
'percentage': true, // whether the taker and maker fee rate is a multiplier or a fixed flat amount
'tierBased': false, // whether the fee depends on your trading tier (your trading volume)
'settleId': 'usdt', // the currencyId of that the contract will settle in, only set if `contract` is true
'settle': 'USDT', // the unified currency code that the contract will settle in, only set if `contract` is true
'expiry': 1641370465121, // the unix expiry timestamp in milliseconds, undefined for everything except market['type'] `future`
'expiryDatetime': '2022-03-26T00:00:00.000Z', // The datetime contract will in iso8601 format
'precision': { // number of decimal digits "after the dot"
'price': 8, // integer or float for TICK_SIZE roundingMode, might be missing if not supplied by the exchange
'amount': 8, // integer, might be missing if not supplied by the exchange
Expand All @@ -769,8 +769,11 @@ Each currency is an associative array (aka dictionary) with the following keys:
'cost': { ... }, // same limits for order cost = price * amount
'leverage': { ... }, // same min/max limits for the leverage of the order
},
'strike': 4000 // price at which a put or call option can be exercised
'optionType': 'call' // call or put string, call option represents an option with the right to buy and put an option with the right to sell
'taker': 0.002, // taker fee rate, 0.002 = 0.2%
'maker': 0.0016, // maker fee rate, 0.0016 = 0.16%
'percentage': true, // whether the taker and maker fee rate is a multiplier or a fixed flat amount
'tierBased': false, // whether the fee depends on your trading tier (your trading volume)
'feeSide': 'get' , // string literal can be 'get', 'give', 'base', 'quote', 'other'
'info': { ... }, // the original unparsed market info from the exchange
}
```
Expand All @@ -779,6 +782,8 @@ Each market is an associative array (aka dictionary) with the following keys:

- `id`. The string or numeric ID of the market or trade instrument within the exchange. Market ids are used inside exchanges internally to identify trading pairs during the request/response process.
- `symbol`. An uppercase string code representation of a particular trading pair or instrument. This is usually written as `BaseCurrency/QuoteCurrency` with a slash as in `BTC/USD`, `LTC/CNY` or `ETH/EUR`, etc. Symbols are used to reference markets within the ccxt library (explained below).
- `base`. A unified uppercase string code of base fiat or crypto currency. This is the standardized currency code that is used to refer to that currency or token throughout CCXT and throughout the Unified CCXT API, it's the language that CCXT understands.
- `quote`. A unified uppercase string code of quoted fiat or crypto currency.
- `baseId`. An exchange-specific id of the base currency for this market, not unified. Can be any string, literally. This is communicated to the exchange using the language the exchange understands.
- `quoteId`. An exchange-specific id of the quote currency, not unified.
- `active`. A boolean indicating whether or not trading this market is currently possible, more about it here: [`active` status](#active-status).
Expand Down

0 comments on commit d7a121e

Please sign in to comment.