STREAM_FIELD_IDS = {
    "account_activity": {
        "0": "subscription-key",
        "1": "account-id",
        "2": "message-type",
        "3": "message-data"
    },
    "level_one_forex": {
        "0": "symbol",
        "1": "bid-price",
        "2": "ask-price",
        "3": "last-price",
        "4": "bid-size",
        "5": "ask-size",
        "6": "total-volume",
        "7": "last-size",
        "8": "quote-time",
        "9": "trade-time",
        "10": "high-price",
        "11": "low-price",
        "12": "close-price",
        "13": "exchange-id",
        "14": "description",
        "15": "open-price",
        "16": "net-change",
        "17": "percent-change",
        "18": "exchange-name",
        "19": "digits",
        "20": "security-status",
        "21": "tick",
        "22": "tick-amount",
        "23": "product",
        "24": "trading-hours",
        "25": "is-tradable",
        "26": "market-maker",
        "27": "52-week-high",
        "28": "52-week-low",
        "29": "mark"
    },
    "level_one_futures": {
        "0": "symbol",
        "1": "bid-price",
        "2": "ask-price",
        "3": "last-price",
        "4": "bid-size",
        "5": "ask-size",
        "6": "ask-id",
        "7": "bid-id",
        "8": "total-volume",
        "9": "last-size",
        "10": "quote-time",
        "11": "trade-time",
        "12": "high-price",
        "13": "low-price",
        "14": "close-price",
        "15": "exchange-id",
        "16": "description",
        "17": "last-id",
        "18": "open-price",
        "19": "net-change",
        "20": "future-percent-change",
        "21": "exhange-name",
        "22": "security-status",
        "23": "open-interest",
        "24": "mark",
        "25": "tick",
        "26": "tick-amount",
        "27": "product",
        "28": "future-price-format",
        "29": "future-trading-hours",
        "30": "future-is-tradable",
        "31": "future-multiplier",
        "32": "future-is-active",
        "33": "future-settlement-price",
        "34": "future-active-symbol",
        "35": "future-expiration-date"
    },
    "level_one_futures_options": {
        "0": "symbol",
        "1": "bid-price",
        "2": "ask-price",
        "3": "last-price",
        "4": "bid-size",
        "5": "ask-size",
        "6": "ask-id",
        "7": "bid-id",
        "8": "total-volume",
        "9": "last-size",
        "10": "quote-time",
        "11": "trade-time",
        "12": "high-price",
        "13": "low-price",
        "14": "close-price",
        "15": "exchange-id",
        "16": "description",
        "17": "last-id",
        "18": "open-price",
        "19": "net-change",
        "20": "future-percent-change",
        "21": "exhange-name",
        "22": "security-status",
        "23": "open-interest",
        "24": "mark",
        "25": "tick",
        "26": "tick-amount",
        "27": "product",
        "28": "future-price-format",
        "29": "future-trading-hours",
        "30": "future-is-tradable",
        "31": "future-multiplier",
        "32": "future-is-active",
        "33": "future-settlement-price",
        "34": "future-active-symbol",
        "35": "future-expiration-date"
    },
    "level_one_option": {
        "0": "symbol",
        "1": "description",
        "2": "bid-price",
        "3": "ask-price",
        "4": "last-price",
        "5": "high-price",
        "6": "low-price",
        "7": "close-price",
        "8": "total-volume",
        "9": "open-interest",
        "10": "volatility",
        "11": "quote-time",
        "12": "trade-time",
        "13": "money-intrinsic-value",
        "14": "quote-day",
        "15": "trade-day",
        "16": "expiration-year",
        "17": "multiplier",
        "18": "digits",
        "19": "open-price",
        "20": "bid-size",
        "21": "ask-size",
        "22": "last-size",
        "23": "net-change",
        "24": "strike-price",
        "25": "contract-type",
        "26": "underlying",
        "27": "expiration-month",
        "28": "deliverables",
        "29": "time-value",
        "30": "expiration-day",
        "31": "days-to-expiration",
        "32": "delta",
        "33": "gamma",
        "34": "theta",
        "35": "vega",
        "36": "rho",
        "37": "security-status",
        "38": "theoretical-option-value",
        "39": "underlying-price",
        "40": "uv-expiration-type",
        "41": "mark"
    },
    "level_one_quote": {
        "0": "symbol",
        "1": "bid-price",
        "2": "ask-price",
        "3": "last-price",
        "4": "bid-size",
        "5": "ask-size",
        "6": "ask-id",
        "7": "bid-id",
        "8": "total-volume",
        "9": "last-size",
        "10": "trade-time",
        "11": "quote-time",
        "12": "high-price",
        "13": "low-price",
        "14": "bid-tick",
        "15": "close-price",
        "16": "exchange-id",
        "17": "marginable",
        "18": "shortable",
        "19": "island-bid",
        "20": "island-ask",
        "21": "island-volume",
        "22": "quote-day",
        "23": "trade-day",
        "24": "volatility",
        "25": "description",
        "26": "last-id",
        "27": "digits",
        "28": "open-price",
        "29": "net-change",
        "30": "52-week-high",
        "31": "52-week-low",
        "32": "pe-ratio",
        "33": "dividend-amount",
        "34": "dividend-yield",
        "35": "island-bid-size",
        "36": "island-ask-size",
        "37": "nav",
        "38": "fund-price",
        "39": "exchange-name",
        "40": "dividend-date",
        "41": "regular-market-quote",
        "42": "regular-market-trade",
        "43": "regular-market-last-price",
        "44": "regular-market-last-size",
        "45": "regular-market-trade-time",
        "46": "regular-market-trade-day",
        "47": "regular-market-net-change",
        "48": "security-status",
        "49": "mark",
        "50": "quote-time-in-long",
        "51": "trade-time-in-long",
        "52": "regular-market-trade-time-in-long"
    },
    "news_headline": {
        "0": "symbol",
        "1": "error-code",
        "2": "story-datetime",
        "3": "headline-id",
        "4": "status",
        "5": "headline",
        "6": "story-id",
        "7": "count-for-keyword",
        "8": "keyword-array",
        "9": "is-hot",
        "10": "story-source"
    },
    "qos_request": {
        "0": "express",
        "1": "real-time",
        "2": "fast",
        "3": "moderate",
        "4": "slow",
        "5": "delayed"
    },
    "timesale": {
        "0": "symbol",
        "1": "trade-time",
        "2": "last-price",
        "3": "last-size",
        "4": "last-sequence"
    },
    "chart_equity": {
        "0": "key",
        "1": "open-price",
        "2": "high-price",
        "3": "low-price",
        "4": "close_price",
        "5": "volume",
        "6": "sequence",
        "7": "chart_time",
        "8": "chart_day"
    },
    "chart_options": {
        "0": "key",
        "1": "open-price",
        "2": "high-price",
        "3": "low-price",
        "4": "close_price",
        "5": "volume",
        "6": "sequence",
        "7": "chart_time",
        "8": "chart_day"
    },
    "chart_futures": {
        "0": "key",
        "1": "open-price",
        "2": "high-price",
        "3": "low-price",
        "4": "close_price",
        "5": "volume",
        "6": "sequence",
        "7": "chart_time",
        "8": "chart_day"
    },
    "level_two_quotes": {
        "0": "key",
        "1": "time",
        "2": "data"
    },
    "level_two_nyse": {
        "0": "key",
        "1": "time",
        "2": "data"
    },
    "level_two_options": {
        "0": "key",
        "1": "time",
        "2": "data"
    },
    "level_two_forex": {
        "0": "key",
        "1": "time",
        "2": "data"
    },
    "level_two_nasdaq": {
        "0": "key",
        "1": "time",
        "2": "data"
    },
    "level_two_futures": {
        "0": "key",
        "1": "time",
        "2": "data"
    }
}


CSV_FIELD_KEYS = {
    "CHART_EQUITY": {
        "1": "chart-time",
        "2": "open-price",
        "3": "high-price",
        "4": "low-price",
        "5": "close-price",
        "6": "volume"},
    "CHART_HISTORY": {"1": "chart-time",
                      "2": "open-price",
                      "3": "high-price",
                      "4": "low-price",
                      "5": "close-price",
                      "6": "volume"},
    "CHART_HISTORY_FUTURES": {"1": "chart-time",
                              "2": "open-price",
                              "3": "high-price",
                              "4": "low-price",
                              "5": "close-price",
                              "6": "volume"},
    "LEVEL_ONE_FOREX": {"1": "bid-price",
                        "10": "high-price",
                        "11": "low-price",
                        "12": "close-price",
                        "13": "exchange-id",
                        "14": "description",
                        "15": "open-price",
                        "16": "net-change",
                        "17": "percent-change",
                        "18": "exchange-name",
                        "19": "digits",
                        "2": "ask-price",
                        "20": "security-status",
                        "21": "tick",
                        "22": "tick-amount",
                        "23": "product",
                        "24": "trading-hours",
                        "25": "is-tradable",
                        "26": "market-maker",
                        "27": "52-week-high",
                        "28": "52-week-low",
                        "29": "mark",
                        "3": "last-price",
                        "4": "bid-size",
                        "5": "ask-size",
                        "6": "total-volume",
                        "7": "last-size",
                        "8": "quote-time",
                        "9": "trade-time",
                        "delayed": "delayed",
                        "key": "symbol"},
    "LEVEL_ONE_FUTURES": {"1": "bid-price",
                          "10": "quote-time",
                          "11": "trade-time",
                          "12": "high-price",
                          "13": "low-price",
                          "14": "close-price",
                          "15": "exchange-id",
                          "16": "description",
                          "17": "last-id",
                          "18": "open-price",
                          "19": "net-change",
                          "2": "ask-price",
                          "20": "future-percent-change",
                          "21": "exhange-name",
                          "22": "security-status",
                          "23": "open-interest",
                          "24": "mark",
                          "25": "tick",
                          "26": "tick-amount",
                          "27": "product",
                          "28": "future-price-format",
                          "29": "future-trading-hours",
                          "3": "last-price",
                          "30": "future-is-tradable",
                          "31": "future-multiplier",
                          "32": "future-is-active",
                          "33": "future-settlement-price",
                          "34": "future-active-symbol",
                          "35": "future-expiration-date",
                          "4": "bid-size",
                          "5": "ask-size",
                          "6": "ask-id",
                          "7": "bid-id",
                          "8": "total-volume",
                          "9": "last-size",
                          "assetMainType": "asset-main-type",
                          "delayed": "delayed",
                          "key": "symbol"},
    "LEVEL_ONE_FUTURES_OPTIONS": {"1": "bid-price",
                                  "10": "quote-time",
                                  "11": "trade-time",
                                  "12": "high-price",
                                  "13": "low-price",
                                  "14": "close-price",
                                  "15": "exchange-id",
                                  "16": "description",
                                  "17": "last-id",
                                  "18": "open-price",
                                  "19": "net-change",
                                  "2": "ask-price",
                                  "20": "future-percent-change",
                                  "21": "exhange-name",
                                  "22": "security-status",
                                  "23": "open-interest",
                                  "24": "mark",
                                  "25": "tick",
                                  "26": "tick-amount",
                                  "27": "product",
                                  "28": "future-price-format",
                                  "29": "future-trading-hours",
                                  "3": "last-price",
                                  "30": "future-is-tradable",
                                  "31": "future-multiplier",
                                  "32": "future-is-active",
                                  "33": "future-settlement-price",
                                  "34": "future-active-symbol",
                                  "35": "future-expiration-date",
                                  "4": "bid-size",
                                  "5": "ask-size",
                                  "6": "ask-id",
                                  "7": "bid-id",
                                  "8": "total-volume",
                                  "9": "last-size",
                                  "delayed": "delayed",
                                  "key": "symbol"},
    "LEVEL_ONE_OPTION": {"1": "description",
                         "10": "volatility",
                         "11": "quote-time",
                         "12": "trade-time",
                         "13": "money-intrinsic-value",
                         "14": "quote-day",
                         "15": "trade-day",
                         "16": "expiration-year",
                         "17": "multiplier",
                         "18": "digits",
                         "19": "open-price",
                         "2": "bid-price",
                         "20": "bid-size",
                         "21": "ask-size",
                         "22": "last-size",
                         "23": "net-change",
                         "24": "strike-price",
                         "25": "contract-type",
                         "26": "underlying",
                         "27": "expiration-month",
                         "28": "deliverables",
                         "29": "time-value",
                         "3": "ask-price",
                         "30": "expiration-day",
                         "31": "days-to-expiration",
                         "32": "delta",
                         "33": "gamma",
                         "34": "theta",
                         "35": "vega",
                         "36": "rho",
                         "37": "security-status",
                         "38": "theoretical-option-value",
                         "39": "underlying-price",
                         "4": "last-price",
                         "40": "uv-expiration-type",
                         "41": "mark",
                         "5": "high-price",
                         "6": "low-price",
                         "7": "close-price",
                         "8": "total-volume",
                         "9": "open-interest",
                         "assetMainType": "asset-main-type",
                         "cusip": "cusip",
                         "delayed": "delayed",
                         "key": "symbol"},
    "LEVEL_ONE_QUOTE": {"1": "symbol",
                        "10": "last-size",
                        "11": "trade-time",
                        "12": "quote-time",
                        "13": "high-price",
                        "14": "low-price",
                        "15": "bid-tick",
                        "16": "close-price",
                        "17": "exchange-id",
                        "18": "marginable",
                        "19": "shortable",
                        "2": "bid-price",
                        "20": "island-bid",
                        "21": "island-ask",
                        "22": "island-volume",
                        "23": "quote-day",
                        "24": "trade-day",
                        "25": "volatility",
                        "26": "description",
                        "27": "last-id",
                        "28": "digits",
                        "29": "open-price",
                        "3": "ask-price",
                        "30": "net-change",
                        "31": "52-week-high",
                        "32": "52-week-low",
                        "33": "pe-ratio",
                        "34": "dividend-amount",
                        "35": "dividend-yield",
                        "36": "island-bid-size",
                        "37": "island-ask-size",
                        "38": "nav",
                        "39": "fund-price",
                        "4": "last-price",
                        "40": "exchange-name",
                        "41": "dividend-date",
                        "42": "regular-market-quote",
                        "43": "regular-market-trade",
                        "44": "regular-market-last-price",
                        "45": "regular-market-last-size",
                        "46": "regular-market-trade-time",
                        "47": "regular-market-trade-day",
                        "48": "regular-market-net-change",
                        "49": "security-status",
                        "5": "bid-size",
                        "50": "mark",
                        "51": "quote-time-in-long",
                        "52": "trade-time-in-long",
                        "6": "ask-size",
                        "7": "ask-id",
                        "8": "bid-id",
                        "9": "total-volume",
                        "assetMainType": "delayed",
                        "cusip": "asset-main-type",
                        "delayed": "symbol",
                        "key": "regular-market-trade-time-in-long"},
    "NEWS_HEADLINE": {"1": "error-code",
                      "10": "story-source",
                      "2": "story-datetime",
                      "3": "headline-id",
                      "4": "status",
                      "5": "headline",
                      "6": "story-id",
                      "7": "count-for-keyword",
                      "8": "keyword-array",
                      "9": "is-hot",
                      "key": "symbol",
                      "seq": "sequence"},
    "TIMESALE": {"1": "trade-time",
                 "2": "last-price",
                 "3": "last-size",
                 "4": "last-sequence",
                 "key": "symbol",
                 "seq": "sequence"}}

CSV_FIELD_KEYS_LEVEL_2 = {
    "NASDAQ_BOOK": "nested",
    "OPTIONS_BOOK": "nested",
    "LISTED_BOOK": "nested",
    "NYSE_BOOK": "nested"
}
