const.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. package markinfo
  2. const (
  3. EURUSD = iota
  4. GBPUSD
  5. USDJPY
  6. USDCHF
  7. AUDUSD
  8. USDCAD
  9. NZDUSD
  10. EURGBP
  11. EURJPY
  12. EURCHF
  13. EURAUD
  14. EURCAD
  15. GBPCHF
  16. GBPJPY
  17. CHFJPY
  18. CADJPY
  19. AUDJPY
  20. AUDCAD
  21. USDMXN
  22. AUDNZD
  23. XAGUSD
  24. XAUUSD
  25. OILUSD
  26. USDTRY
  27. GBPAUD //from lmax symbol list
  28. GBPCAD
  29. EURCZK
  30. GBPCZK
  31. USDCZK
  32. EURDKK
  33. GBPDKK
  34. USDDKK
  35. EURHKD
  36. GBPHKD
  37. USDHKD
  38. EURHUF
  39. GBPHUF
  40. USDHUF
  41. EURMXN
  42. GBPMXN
  43. EURNOK
  44. GBPNOK
  45. USDNOK
  46. EURNZD
  47. GBPNZD
  48. EURPLN
  49. GBPPLN
  50. USDPLN
  51. EURSEK
  52. GBPSEK
  53. USDSEK
  54. EURSGD
  55. GBPSGD
  56. USDSGD
  57. EURTRY
  58. GBPTRY
  59. EURZAR
  60. GBPZAR
  61. USDZAR
  62. NZDJPY
  63. AUDCHF
  64. CADCHF
  65. NZDCAD
  66. NZDCHF
  67. NZDSGD
  68. SGDJPY
  69. XAGEUR
  70. XAUEUR
  71. ZARJPY
  72. LTCUSD
  73. BTCUSD
  74. BTCCNY
  75. LTCCNY
  76. BTCFUSD
  77. BTCETH
  78. ETHCNY
  79. ETCCNY
  80. SCCNY
  81. BTYCNY
  82. ZECCNY
  83. BTSCNY
  84. BCCCNY
  85. NYCCCNY
  86. WTCCNY
  87. ETHBTC
  88. ETCBTC
  89. ZECBTC
  90. LTCBTC
  91. BCCBTC
  92. BCCUSDT
  93. BTCUSDT
  94. ZECUSDT
  95. LTCUSDT
  96. ETCUSDT
  97. ETHUSDT
  98. BTYUSDT
  99. BTSUSDT
  100. SCUSDT
  101. BTYBTC
  102. BTSBTC
  103. SCBTC
  104. YCCUSDT
  105. BTCSUSDT
  106. DCRUSDT
  107. BNTUSDT
  108. BNTBTC
  109. SCTCUSDT
  110. SCTCBTC
  111. YCCBTC
  112. YCCETH
  113. JBUSDT
  114. JBBTC
  115. JBETH
  116. OPTCUSDT
  117. OPTCBTC
  118. OPTCETH
  119. BCCETH
  120. ZECETH
  121. ETCETH
  122. LTCETH
  123. STILT
  124. ITVBUSDT
  125. ITVBBTC
  126. ITVBETH
  127. BTYETH
  128. FHUSDT
  129. CWVUSDT
  130. FHETH
  131. TMCETH
  132. FANSUSDT
  133. FANSBTC
  134. FANSETH
  135. WTBWTC
  136. CNSUSDT
  137. CurrencyCount
  138. UK100
  139. WS30
  140. SPX
  141. NDX
  142. GDAXI
  143. FCHI
  144. STOXX50E
  145. AEX
  146. CLQ2
  147. CLU2
  148. CLV2
  149. LCOQ2
  150. LCOU2
  151. LCOV2
  152. GCQ2
  153. LGON2
  154. LGOQ2
  155. LGOU2
  156. FXCount
  157. SH510300
  158. SH000300
  159. TF03
  160. TF06
  161. TF09
  162. TF12
  163. TFMI
  164. IF01
  165. IF02
  166. IF03
  167. IF04
  168. IF05
  169. IF06
  170. IF07
  171. IF08
  172. IF09
  173. IF10
  174. IF11
  175. IF12 //数据放在data中,IF120
  176. IF16
  177. IF17
  178. IF18
  179. IF19
  180. IFMI
  181. IF1509
  182. IF1510
  183. AG1512
  184. AU1512
  185. RB1601
  186. RB1610
  187. RU1601
  188. SR1601
  189. ZN12
  190. RB05
  191. RB0
  192. AG06
  193. MAC
  194. FuturesCount
  195. SymbolCount
  196. )
  197. var symbolMap map[string]int
  198. var symbols = map[int]string{
  199. MAC: "MAC",
  200. EURUSD: "EURUSD",
  201. GBPUSD: "GBPUSD",
  202. USDJPY: "USDJPY",
  203. USDCHF: "USDCHF",
  204. AUDUSD: "AUDUSD",
  205. USDCAD: "USDCAD",
  206. NZDUSD: "NZDUSD",
  207. EURGBP: "EURGBP",
  208. EURJPY: "EURJPY",
  209. EURCHF: "EURCHF",
  210. EURAUD: "EURAUD",
  211. EURCAD: "EURCAD",
  212. GBPCHF: "GBPCHF",
  213. GBPJPY: "GBPJPY",
  214. CHFJPY: "CHFJPY",
  215. CADJPY: "CADJPY",
  216. AUDJPY: "AUDJPY",
  217. AUDCAD: "AUDCAD",
  218. USDMXN: "USDMXN",
  219. AUDNZD: "AUDNZD",
  220. XAGUSD: "XAGUSD",
  221. XAUUSD: "XAUUSD",
  222. OILUSD: "OILUSD",
  223. USDTRY: "USDTRY",
  224. GBPAUD: "GBPAUD",
  225. GBPCAD: "GBPCAD",
  226. EURCZK: "EURCZK",
  227. GBPCZK: "GBPCZK",
  228. USDCZK: "USDCZK",
  229. EURDKK: "EURDKK",
  230. GBPDKK: "GBPDKK",
  231. USDDKK: "USDDKK",
  232. EURHKD: "EURHKD",
  233. GBPHKD: "GBPHKD",
  234. USDHKD: "USDHKD",
  235. EURHUF: "EURHUF",
  236. GBPHUF: "GBPHUF",
  237. USDHUF: "USDHUF",
  238. EURMXN: "EURMXN",
  239. GBPMXN: "GBPMXN",
  240. EURNOK: "EURNOK",
  241. GBPNOK: "GBPNOK",
  242. USDNOK: "USDNOK",
  243. EURNZD: "EURNZD",
  244. GBPNZD: "GBPNZD",
  245. EURPLN: "EURPLN",
  246. GBPPLN: "GBPPLN",
  247. USDPLN: "USDPLN",
  248. EURSEK: "EURSEK",
  249. GBPSEK: "GBPSEK",
  250. USDSEK: "USDSEK",
  251. EURSGD: "EURSGD",
  252. GBPSGD: "GBPSGD",
  253. USDSGD: "USDSGD",
  254. EURTRY: "EURTRY",
  255. GBPTRY: "GBPTRY",
  256. EURZAR: "EURZAR",
  257. GBPZAR: "GBPZAR",
  258. USDZAR: "USDZAR",
  259. NZDJPY: "NZDJPY",
  260. AUDCHF: "AUDCHF",
  261. CADCHF: "CADCHF",
  262. NZDCAD: "NZDCAD",
  263. NZDCHF: "NZDCHF",
  264. NZDSGD: "NZDSGD",
  265. SGDJPY: "SGDJPY",
  266. XAGEUR: "XAGEUR",
  267. XAUEUR: "XAUEUR",
  268. ZARJPY: "ZARJPY",
  269. LTCUSD: "LTCUSD",
  270. BTCUSD: "BTCUSD",
  271. BTCCNY: "BTCCNY",
  272. LTCCNY: "LTCCNY",
  273. BTCFUSD: "BTCFUSD",
  274. BTCETH: "BTCETH",
  275. ETHCNY: "ETHCNY",
  276. ETCCNY: "ETCCNY",
  277. BTYCNY: "BTYCNY",
  278. SCCNY: "SCCNY",
  279. ZECCNY: "ZECCNY",
  280. BTSCNY: "BTSCNY",
  281. BCCCNY: "BCCCNY",
  282. NYCCCNY: "NYCCCNY",
  283. WTCCNY: "WTCCNY",
  284. ETHBTC: "ETHBTC",
  285. ETCBTC: "ETCBTC",
  286. ZECBTC: "ZECBTC",
  287. LTCBTC: "LTCBTC",
  288. BCCBTC: "BCCBTC",
  289. BCCUSDT: "BCCUSDT",
  290. BTCUSDT: "BTCUSDT",
  291. ZECUSDT: "ZECUSDT",
  292. LTCUSDT: "LTCUSDT",
  293. ETCUSDT: "ETCUSDT",
  294. ETHUSDT: "ETHUSDT",
  295. BTYUSDT: "BTYUSDT",
  296. BTSUSDT: "BTSUSDT",
  297. SCUSDT: "SCUSDT",
  298. BTYBTC: "BTYBTC",
  299. BTSBTC: "BTSBTC",
  300. SCBTC: "SCBTC",
  301. YCCUSDT: "YCCUSDT",
  302. BTCSUSDT: "BTCSUSDT",
  303. DCRUSDT: "DCRUSDT",
  304. BNTUSDT: "BNTUSDT",
  305. BNTBTC: "BNTBTC",
  306. SCTCUSDT: "SCTCUSDT",
  307. SCTCBTC: "SCTCBTC",
  308. YCCBTC: "YCCBTC",
  309. YCCETH: "YCCETH",
  310. JBUSDT: "JBUSDT",
  311. JBBTC: "JBBTC",
  312. JBETH: "JBETH",
  313. OPTCUSDT: "OPTCUSDT",
  314. OPTCBTC: "OPTCBTC",
  315. OPTCETH: "OPTCETH",
  316. BCCETH: "BCCETH",
  317. ZECETH: "ZECETH",
  318. ETCETH: "ETCETH",
  319. LTCETH: "LTCETH",
  320. STILT: "STILT",
  321. ITVBUSDT: "ITVBUSDT",
  322. ITVBBTC: "ITVBBTC",
  323. ITVBETH: "ITVBETH",
  324. BTYETH: "BTYETH",
  325. FHUSDT: "FHUSDT",
  326. CWVUSDT: "CWVUSDT",
  327. FHETH: "FHETH",
  328. TMCETH: "TMCETH",
  329. FANSUSDT: "FANSUSDT",
  330. FANSBTC: "FANSBTC",
  331. FANSETH: "FANSETH",
  332. WTBWTC: "WTBWTC",
  333. CNSUSDT: "CNSUSDT",
  334. UK100: "UK100",
  335. WS30: "WS30",
  336. SPX: "SPX",
  337. NDX: "NDX",
  338. GDAXI: "GDAXI",
  339. FCHI: "FCHI",
  340. STOXX50E: "STOXX50E",
  341. AEX: "AEX",
  342. CLQ2: "CLQ2",
  343. CLU2: "CLU2",
  344. CLV2: "CLV2",
  345. LCOQ2: "LCOQ2",
  346. LCOU2: "LCOU2",
  347. LCOV2: "LCOV2",
  348. GCQ2: "GCQ2",
  349. LGON2: "LGON2",
  350. LGOQ2: "LGOQ2",
  351. LGOU2: "LGOU2",
  352. FXCount: "FXCount",
  353. SH510300: "SH510300",
  354. SH000300: "SH000300",
  355. TF03: "TF03",
  356. TF06: "TF06",
  357. TF09: "TF09",
  358. TF12: "TF12",
  359. TFMI: "TFMI",
  360. IF01: "IF01",
  361. IF02: "IF02",
  362. IF03: "IF03",
  363. IF04: "IF04",
  364. IF05: "IF05",
  365. IF06: "IF06",
  366. IF07: "IF07",
  367. IF08: "IF08",
  368. IF09: "IF09",
  369. IF10: "IF10",
  370. IF11: "IF11",
  371. IF12: "IF12",
  372. IF16: "IF16",
  373. IF17: "IF17",
  374. IF18: "IF18",
  375. IF19: "IF19",
  376. IFMI: "IFMI",
  377. IF1509: "IF1509",
  378. IF1510: "IF1510",
  379. AG1512: "AG1512",
  380. AU1512: "AU1512",
  381. RB1610: "RB1610",
  382. RU1601: "RU1601",
  383. SR1601: "SR1601",
  384. ZN12: "ZN12",
  385. RB05: "RB05",
  386. RB0: "RB0",
  387. AG06: "AG06",
  388. FuturesCount: "FuturesCount",
  389. SymbolCount: "SymbolCount",
  390. CurrencyCount: "CurrencyCount",
  391. }
  392. var symbolUnit map[string]float64
  393. var symbolUnitInt = map[int]float64{
  394. CurrencyCount: 0.001,
  395. MAC: 0.001,
  396. EURUSD: 0.00001,
  397. GBPUSD: 0.00001,
  398. USDJPY: 0.001,
  399. USDCHF: 0.00001,
  400. AUDUSD: 0.00001,
  401. USDCAD: 0.00001,
  402. NZDUSD: 0.00001,
  403. EURGBP: 0.00001,
  404. EURJPY: 0.001,
  405. EURCHF: 0.00001,
  406. EURAUD: 0.00001,
  407. EURCAD: 0.00001,
  408. GBPCHF: 0.00001,
  409. GBPJPY: 0.001,
  410. CHFJPY: 0.001,
  411. CADJPY: 0.001,
  412. AUDJPY: 0.001,
  413. AUDCAD: 0.00001,
  414. USDMXN: 0.00001,
  415. AUDNZD: 0.00001,
  416. XAGUSD: 0.001,
  417. XAUUSD: 0.001,
  418. OILUSD: 0.001,
  419. USDTRY: 0.00001,
  420. GBPAUD: 0.00001,
  421. GBPCAD: 0.00001,
  422. EURCZK: 0.0001,
  423. GBPCZK: 0.0001,
  424. USDCZK: 0.0001,
  425. EURDKK: 0.00001,
  426. GBPDKK: 0.00001,
  427. USDDKK: 0.00001,
  428. EURHKD: 0.00001,
  429. GBPHKD: 0.00001,
  430. USDHKD: 0.00001,
  431. EURHUF: 0.001,
  432. GBPHUF: 0.001,
  433. USDHUF: 0.001,
  434. EURMXN: 0.00001,
  435. GBPMXN: 0.00001,
  436. EURNOK: 0.00001,
  437. GBPNOK: 0.00001,
  438. USDNOK: 0.00001,
  439. EURNZD: 0.00001,
  440. GBPNZD: 0.00001,
  441. EURPLN: 0.00001,
  442. GBPPLN: 0.00001,
  443. USDPLN: 0.00001,
  444. EURSEK: 0.00001,
  445. GBPSEK: 0.00001,
  446. USDSEK: 0.00001,
  447. EURSGD: 0.00001,
  448. GBPSGD: 0.00001,
  449. USDSGD: 0.00001,
  450. EURTRY: 0.00001,
  451. GBPTRY: 0.00001,
  452. EURZAR: 0.00001,
  453. GBPZAR: 0.00001,
  454. USDZAR: 0.00001,
  455. NZDJPY: 0.001,
  456. AUDCHF: 0.00001,
  457. CADCHF: 0.00001,
  458. NZDCAD: 0.00001,
  459. NZDCHF: 0.00001,
  460. NZDSGD: 0.00001,
  461. SGDJPY: 0.001,
  462. XAGEUR: 0.00001,
  463. XAUEUR: 0.00001,
  464. ZARJPY: 0.001,
  465. LTCUSD: 0.00001,
  466. BTCUSD: 0.001,
  467. BTCCNY: 0.001,
  468. LTCCNY: 0.001,
  469. BTCFUSD: 0.001,
  470. BTCETH: 0.00000001,
  471. BTYCNY: 0.001,
  472. ETHCNY: 0.00001,
  473. ETCCNY: 0.00001,
  474. SCCNY: 0.00001,
  475. ZECCNY: 0.00001,
  476. BTSCNY: 0.00001,
  477. BCCCNY: 0.00001,
  478. NYCCCNY: 0.00001,
  479. WTCCNY: 0.00001,
  480. ETHBTC: 0.00001,
  481. ETCBTC: 0.00001,
  482. ZECBTC: 0.00001,
  483. LTCBTC: 0.00001,
  484. BCCBTC: 0.00001,
  485. BCCUSDT: 0.00001,
  486. BTCUSDT: 0.00001,
  487. ZECUSDT: 0.00001,
  488. LTCUSDT: 0.00001,
  489. ETCUSDT: 0.00001,
  490. ETHUSDT: 0.00001,
  491. BTYUSDT: 0.00001,
  492. BTSUSDT: 0.00001,
  493. SCUSDT: 0.00001,
  494. BTYBTC: 0.00001,
  495. BTSBTC: 0.00001,
  496. SCBTC: 0.00001,
  497. YCCUSDT: 0.00001,
  498. BTCSUSDT: 0.00001,
  499. DCRUSDT: 0.00001,
  500. BNTUSDT: 0.00001,
  501. BNTBTC: 0.00001,
  502. SCTCUSDT: 0.00001,
  503. SCTCBTC: 0.00001,
  504. YCCBTC: 0.00001,
  505. YCCETH: 0.00001,
  506. JBUSDT: 0.00001,
  507. JBBTC: 0.00001,
  508. JBETH: 0.00001,
  509. OPTCUSDT: 0.00001,
  510. OPTCBTC: 0.00001,
  511. OPTCETH: 0.00001,
  512. BCCETH: 0.00001,
  513. ZECETH: 0.00001,
  514. ETCETH: 0.00001,
  515. LTCETH: 0.00001,
  516. STILT: 0.00001,
  517. ITVBUSDT: 0.00001,
  518. ITVBBTC: 0.00001,
  519. ITVBETH: 0.00001,
  520. BTYETH: 0.00001,
  521. FHUSDT: 0.00001,
  522. CWVUSDT: 0.00001,
  523. FHETH: 0.00001,
  524. TMCETH: 0.00001,
  525. FANSUSDT: 0.00001,
  526. FANSBTC: 0.00001,
  527. FANSETH: 0.00001,
  528. WTBWTC: 0.00001,
  529. CNSUSDT: 0.00001,
  530. UK100: 0.1,
  531. WS30: 0.1,
  532. SPX: 0.1,
  533. NDX: 0.1,
  534. GDAXI: 0.1,
  535. FCHI: 0.1,
  536. STOXX50E: 0.1,
  537. AEX: 0.1,
  538. CLQ2: 0.1,
  539. CLU2: 0.1,
  540. CLV2: 0.1,
  541. LCOQ2: 0.1,
  542. LCOU2: 0.1,
  543. LCOV2: 0.1,
  544. GCQ2: 0.1,
  545. LGON2: 0.1,
  546. LGOQ2: 0.1,
  547. LGOU2: 0.1,
  548. SH000300: 0.1,
  549. IFMI: 0.1,
  550. SH510300: 0.1,
  551. TF03: 0.1,
  552. TF06: 0.1,
  553. TF09: 0.1,
  554. TF12: 0.1,
  555. TFMI: 0.1,
  556. IF01: 0.1,
  557. IF02: 0.1,
  558. IF03: 0.1,
  559. IF04: 0.1,
  560. IF05: 0.1,
  561. IF06: 0.1,
  562. IF07: 0.1,
  563. IF08: 0.1,
  564. IF09: 0.1,
  565. IF10: 0.1,
  566. IF11: 0.1,
  567. IF12: 0.1,
  568. IF16: 0.1,
  569. IF17: 0.1,
  570. IF18: 0.1,
  571. IF19: 0.1,
  572. IF1509: 0.1,
  573. AG1512: 0.1,
  574. AU1512: 0.1,
  575. RB1601: 0.1,
  576. RB1610: 0.1,
  577. RU1601: 0.1,
  578. SR1601: 0.1,
  579. ZN12: 1,
  580. RB05: 1,
  581. RB0: 1,
  582. AG06: 1,
  583. }
  584. var symbolIdBookId map[int]int
  585. var bookIdSymbolId = map[int]int{
  586. 1111: MAC,
  587. 4008: AUDJPY,
  588. 4007: AUDUSD,
  589. 4009: CHFJPY,
  590. 4016: EURAUD,
  591. 4015: EURCAD,
  592. 4011: EURCHF,
  593. 4003: EURGBP,
  594. 4006: EURJPY,
  595. 4001: EURUSD,
  596. 4017: GBPAUD,
  597. 4014: GBPCAD,
  598. 4012: GBPCHF,
  599. 4005: GBPJPY,
  600. 4002: GBPUSD,
  601. 4013: USDCAD,
  602. 4010: USDCHF,
  603. 4004: USDJPY,
  604. 100479: EURCZK,
  605. 100481: GBPCZK,
  606. 100483: USDCZK,
  607. 100485: EURDKK,
  608. 100487: GBPDKK,
  609. 100489: USDDKK,
  610. 100491: EURHKD,
  611. 100493: GBPHKD,
  612. 100495: USDHKD,
  613. 100497: EURHUF,
  614. 100499: GBPHUF,
  615. 100501: USDHUF,
  616. 100503: EURMXN,
  617. 100505: GBPMXN,
  618. 100507: USDMXN,
  619. 100509: EURNOK,
  620. 100511: GBPNOK,
  621. 100513: USDNOK,
  622. 100515: EURNZD,
  623. 100517: GBPNZD,
  624. 100519: EURPLN,
  625. 100521: GBPPLN,
  626. 100523: USDPLN,
  627. 100525: EURSEK,
  628. 100527: GBPSEK,
  629. 100529: USDSEK,
  630. 100531: EURSGD,
  631. 100533: GBPSGD,
  632. 100535: USDSGD,
  633. 100537: EURTRY,
  634. 100539: GBPTRY,
  635. 100541: USDTRY,
  636. 100543: EURZAR,
  637. 100545: GBPZAR,
  638. 100547: USDZAR,
  639. 100613: NZDUSD,
  640. 100615: AUDNZD,
  641. 100617: NZDJPY,
  642. 100619: AUDCHF,
  643. 100667: AUDCAD,
  644. 100671: CADCHF,
  645. 100669: CADJPY,
  646. 100673: NZDCAD,
  647. 100675: NZDCHF,
  648. 100677: NZDSGD,
  649. 100678: SGDJPY,
  650. 100679: XAGEUR,
  651. 100680: XAUEUR,
  652. 100681: ZARJPY,
  653. 100089: UK100,
  654. 100091: WS30,
  655. 100093: SPX,
  656. 100095: NDX,
  657. 100097: GDAXI,
  658. 100099: FCHI,
  659. 100101: STOXX50E,
  660. 100103: AEX,
  661. 100637: XAUUSD,
  662. 100639: XAGUSD,
  663. 100699: CLQ2,
  664. 100705: CLU2,
  665. 100711: CLV2,
  666. 100697: LCOQ2,
  667. 100703: LCOU2,
  668. 100709: LCOV2,
  669. 100659: GCQ2,
  670. 100695: LGON2,
  671. 100701: LGOQ2,
  672. 100707: LGOU2,
  673. }