const.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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. CurrencyCount
  108. UK100
  109. WS30
  110. SPX
  111. NDX
  112. GDAXI
  113. FCHI
  114. STOXX50E
  115. AEX
  116. CLQ2
  117. CLU2
  118. CLV2
  119. LCOQ2
  120. LCOU2
  121. LCOV2
  122. GCQ2
  123. LGON2
  124. LGOQ2
  125. LGOU2
  126. FXCount
  127. SH510300
  128. SH000300
  129. TF03
  130. TF06
  131. TF09
  132. TF12
  133. TFMI
  134. IF01
  135. IF02
  136. IF03
  137. IF04
  138. IF05
  139. IF06
  140. IF07
  141. IF08
  142. IF09
  143. IF10
  144. IF11
  145. IF12 //数据放在data中,IF120
  146. IF16
  147. IF17
  148. IF18
  149. IF19
  150. IFMI
  151. IF1509
  152. IF1510
  153. AG1512
  154. AU1512
  155. RB1601
  156. RB1610
  157. RU1601
  158. SR1601
  159. ZN12
  160. RB05
  161. RB0
  162. AG06
  163. MAC
  164. FuturesCount
  165. SymbolCount
  166. )
  167. var symbolMap map[string]int
  168. var symbols = map[int]string{
  169. MAC: "MAC",
  170. EURUSD: "EURUSD",
  171. GBPUSD: "GBPUSD",
  172. USDJPY: "USDJPY",
  173. USDCHF: "USDCHF",
  174. AUDUSD: "AUDUSD",
  175. USDCAD: "USDCAD",
  176. NZDUSD: "NZDUSD",
  177. EURGBP: "EURGBP",
  178. EURJPY: "EURJPY",
  179. EURCHF: "EURCHF",
  180. EURAUD: "EURAUD",
  181. EURCAD: "EURCAD",
  182. GBPCHF: "GBPCHF",
  183. GBPJPY: "GBPJPY",
  184. CHFJPY: "CHFJPY",
  185. CADJPY: "CADJPY",
  186. AUDJPY: "AUDJPY",
  187. AUDCAD: "AUDCAD",
  188. USDMXN: "USDMXN",
  189. AUDNZD: "AUDNZD",
  190. XAGUSD: "XAGUSD",
  191. XAUUSD: "XAUUSD",
  192. OILUSD: "OILUSD",
  193. USDTRY: "USDTRY",
  194. GBPAUD: "GBPAUD",
  195. GBPCAD: "GBPCAD",
  196. EURCZK: "EURCZK",
  197. GBPCZK: "GBPCZK",
  198. USDCZK: "USDCZK",
  199. EURDKK: "EURDKK",
  200. GBPDKK: "GBPDKK",
  201. USDDKK: "USDDKK",
  202. EURHKD: "EURHKD",
  203. GBPHKD: "GBPHKD",
  204. USDHKD: "USDHKD",
  205. EURHUF: "EURHUF",
  206. GBPHUF: "GBPHUF",
  207. USDHUF: "USDHUF",
  208. EURMXN: "EURMXN",
  209. GBPMXN: "GBPMXN",
  210. EURNOK: "EURNOK",
  211. GBPNOK: "GBPNOK",
  212. USDNOK: "USDNOK",
  213. EURNZD: "EURNZD",
  214. GBPNZD: "GBPNZD",
  215. EURPLN: "EURPLN",
  216. GBPPLN: "GBPPLN",
  217. USDPLN: "USDPLN",
  218. EURSEK: "EURSEK",
  219. GBPSEK: "GBPSEK",
  220. USDSEK: "USDSEK",
  221. EURSGD: "EURSGD",
  222. GBPSGD: "GBPSGD",
  223. USDSGD: "USDSGD",
  224. EURTRY: "EURTRY",
  225. GBPTRY: "GBPTRY",
  226. EURZAR: "EURZAR",
  227. GBPZAR: "GBPZAR",
  228. USDZAR: "USDZAR",
  229. NZDJPY: "NZDJPY",
  230. AUDCHF: "AUDCHF",
  231. CADCHF: "CADCHF",
  232. NZDCAD: "NZDCAD",
  233. NZDCHF: "NZDCHF",
  234. NZDSGD: "NZDSGD",
  235. SGDJPY: "SGDJPY",
  236. XAGEUR: "XAGEUR",
  237. XAUEUR: "XAUEUR",
  238. ZARJPY: "ZARJPY",
  239. LTCUSD: "LTCUSD",
  240. BTCUSD: "BTCUSD",
  241. BTCCNY: "BTCCNY",
  242. LTCCNY: "LTCCNY",
  243. BTCFUSD: "BTCFUSD",
  244. BTCETH: "BTCETH",
  245. ETHCNY: "ETHCNY",
  246. ETCCNY: "ETCCNY",
  247. BTYCNY: "BTYCNY",
  248. SCCNY: "SCCNY",
  249. ZECCNY: "ZECCNY",
  250. BTSCNY: "BTSCNY",
  251. BCCCNY: "BCCCNY",
  252. NYCCCNY: "NYCCCNY",
  253. WTCCNY: "WTCCNY",
  254. ETHBTC: "ETHBTC",
  255. ETCBTC: "ETCBTC",
  256. ZECBTC: "ZECBTC",
  257. LTCBTC: "LTCBTC",
  258. BCCBTC: "BCCBTC",
  259. BCCUSDT: "BCCUSDT",
  260. BTCUSDT: "BTCUSDT",
  261. ZECUSDT: "ZECUSDT",
  262. LTCUSDT: "LTCUSDT",
  263. ETCUSDT: "ETCUSDT",
  264. ETHUSDT: "ETHUSDT",
  265. BTYUSDT: "BTYUSDT",
  266. BTSUSDT: "BTSUSDT",
  267. SCUSDT: "SCUSDT",
  268. BTYBTC: "BTYBTC",
  269. BTSBTC: "BTSBTC",
  270. SCBTC: "SCBTC",
  271. YCCUSDT: "YCCUSDT",
  272. BTCSUSDT: "BTCSUSDT",
  273. DCRUSDT: "DCRUSDT",
  274. UK100: "UK100",
  275. WS30: "WS30",
  276. SPX: "SPX",
  277. NDX: "NDX",
  278. GDAXI: "GDAXI",
  279. FCHI: "FCHI",
  280. STOXX50E: "STOXX50E",
  281. AEX: "AEX",
  282. CLQ2: "CLQ2",
  283. CLU2: "CLU2",
  284. CLV2: "CLV2",
  285. LCOQ2: "LCOQ2",
  286. LCOU2: "LCOU2",
  287. LCOV2: "LCOV2",
  288. GCQ2: "GCQ2",
  289. LGON2: "LGON2",
  290. LGOQ2: "LGOQ2",
  291. LGOU2: "LGOU2",
  292. FXCount: "FXCount",
  293. SH510300: "SH510300",
  294. SH000300: "SH000300",
  295. TF03: "TF03",
  296. TF06: "TF06",
  297. TF09: "TF09",
  298. TF12: "TF12",
  299. TFMI: "TFMI",
  300. IF01: "IF01",
  301. IF02: "IF02",
  302. IF03: "IF03",
  303. IF04: "IF04",
  304. IF05: "IF05",
  305. IF06: "IF06",
  306. IF07: "IF07",
  307. IF08: "IF08",
  308. IF09: "IF09",
  309. IF10: "IF10",
  310. IF11: "IF11",
  311. IF12: "IF12",
  312. IF16: "IF16",
  313. IF17: "IF17",
  314. IF18: "IF18",
  315. IF19: "IF19",
  316. IFMI: "IFMI",
  317. IF1509: "IF1509",
  318. IF1510: "IF1510",
  319. AG1512: "AG1512",
  320. AU1512: "AU1512",
  321. RB1610: "RB1610",
  322. RU1601: "RU1601",
  323. SR1601: "SR1601",
  324. ZN12: "ZN12",
  325. RB05: "RB05",
  326. RB0: "RB0",
  327. AG06: "AG06",
  328. FuturesCount: "FuturesCount",
  329. SymbolCount: "SymbolCount",
  330. CurrencyCount: "CurrencyCount",
  331. }
  332. var symbolUnit map[string]float64
  333. var symbolUnitInt = map[int]float64{
  334. CurrencyCount: 0.001,
  335. MAC: 0.001,
  336. EURUSD: 0.00001,
  337. GBPUSD: 0.00001,
  338. USDJPY: 0.001,
  339. USDCHF: 0.00001,
  340. AUDUSD: 0.00001,
  341. USDCAD: 0.00001,
  342. NZDUSD: 0.00001,
  343. EURGBP: 0.00001,
  344. EURJPY: 0.001,
  345. EURCHF: 0.00001,
  346. EURAUD: 0.00001,
  347. EURCAD: 0.00001,
  348. GBPCHF: 0.00001,
  349. GBPJPY: 0.001,
  350. CHFJPY: 0.001,
  351. CADJPY: 0.001,
  352. AUDJPY: 0.001,
  353. AUDCAD: 0.00001,
  354. USDMXN: 0.00001,
  355. AUDNZD: 0.00001,
  356. XAGUSD: 0.001,
  357. XAUUSD: 0.001,
  358. OILUSD: 0.001,
  359. USDTRY: 0.00001,
  360. GBPAUD: 0.00001,
  361. GBPCAD: 0.00001,
  362. EURCZK: 0.0001,
  363. GBPCZK: 0.0001,
  364. USDCZK: 0.0001,
  365. EURDKK: 0.00001,
  366. GBPDKK: 0.00001,
  367. USDDKK: 0.00001,
  368. EURHKD: 0.00001,
  369. GBPHKD: 0.00001,
  370. USDHKD: 0.00001,
  371. EURHUF: 0.001,
  372. GBPHUF: 0.001,
  373. USDHUF: 0.001,
  374. EURMXN: 0.00001,
  375. GBPMXN: 0.00001,
  376. EURNOK: 0.00001,
  377. GBPNOK: 0.00001,
  378. USDNOK: 0.00001,
  379. EURNZD: 0.00001,
  380. GBPNZD: 0.00001,
  381. EURPLN: 0.00001,
  382. GBPPLN: 0.00001,
  383. USDPLN: 0.00001,
  384. EURSEK: 0.00001,
  385. GBPSEK: 0.00001,
  386. USDSEK: 0.00001,
  387. EURSGD: 0.00001,
  388. GBPSGD: 0.00001,
  389. USDSGD: 0.00001,
  390. EURTRY: 0.00001,
  391. GBPTRY: 0.00001,
  392. EURZAR: 0.00001,
  393. GBPZAR: 0.00001,
  394. USDZAR: 0.00001,
  395. NZDJPY: 0.001,
  396. AUDCHF: 0.00001,
  397. CADCHF: 0.00001,
  398. NZDCAD: 0.00001,
  399. NZDCHF: 0.00001,
  400. NZDSGD: 0.00001,
  401. SGDJPY: 0.001,
  402. XAGEUR: 0.00001,
  403. XAUEUR: 0.00001,
  404. ZARJPY: 0.001,
  405. LTCUSD: 0.00001,
  406. BTCUSD: 0.001,
  407. BTCCNY: 0.001,
  408. LTCCNY: 0.001,
  409. BTCFUSD: 0.001,
  410. BTCETH: 0.00000001,
  411. BTYCNY: 0.001,
  412. ETHCNY: 0.00001,
  413. ETCCNY: 0.00001,
  414. SCCNY: 0.00001,
  415. ZECCNY: 0.00001,
  416. BTSCNY: 0.00001,
  417. BCCCNY: 0.00001,
  418. NYCCCNY: 0.00001,
  419. WTCCNY: 0.00001,
  420. ETHBTC: 0.00001,
  421. ETCBTC: 0.00001,
  422. ZECBTC: 0.00001,
  423. LTCBTC: 0.00001,
  424. BCCBTC: 0.00001,
  425. BCCUSDT: 0.00001,
  426. BTCUSDT: 0.00001,
  427. ZECUSDT: 0.00001,
  428. LTCUSDT: 0.00001,
  429. ETCUSDT: 0.00001,
  430. ETHUSDT: 0.00001,
  431. BTYUSDT: 0.00001,
  432. BTSUSDT: 0.00001,
  433. SCUSDT: 0.00001,
  434. BTYBTC: 0.00001,
  435. BTSBTC: 0.00001,
  436. SCBTC: 0.00001,
  437. YCCUSDT: 0.00001,
  438. BTCSUSDT: 0.00001,
  439. DCRUSDT: 0.00001,
  440. UK100: 0.1,
  441. WS30: 0.1,
  442. SPX: 0.1,
  443. NDX: 0.1,
  444. GDAXI: 0.1,
  445. FCHI: 0.1,
  446. STOXX50E: 0.1,
  447. AEX: 0.1,
  448. CLQ2: 0.1,
  449. CLU2: 0.1,
  450. CLV2: 0.1,
  451. LCOQ2: 0.1,
  452. LCOU2: 0.1,
  453. LCOV2: 0.1,
  454. GCQ2: 0.1,
  455. LGON2: 0.1,
  456. LGOQ2: 0.1,
  457. LGOU2: 0.1,
  458. SH000300: 0.1,
  459. IFMI: 0.1,
  460. SH510300: 0.1,
  461. TF03: 0.1,
  462. TF06: 0.1,
  463. TF09: 0.1,
  464. TF12: 0.1,
  465. TFMI: 0.1,
  466. IF01: 0.1,
  467. IF02: 0.1,
  468. IF03: 0.1,
  469. IF04: 0.1,
  470. IF05: 0.1,
  471. IF06: 0.1,
  472. IF07: 0.1,
  473. IF08: 0.1,
  474. IF09: 0.1,
  475. IF10: 0.1,
  476. IF11: 0.1,
  477. IF12: 0.1,
  478. IF16: 0.1,
  479. IF17: 0.1,
  480. IF18: 0.1,
  481. IF19: 0.1,
  482. IF1509: 0.1,
  483. AG1512: 0.1,
  484. AU1512: 0.1,
  485. RB1601: 0.1,
  486. RB1610: 0.1,
  487. RU1601: 0.1,
  488. SR1601: 0.1,
  489. ZN12: 1,
  490. RB05: 1,
  491. RB0: 1,
  492. AG06: 1,
  493. }
  494. var symbolIdBookId map[int]int
  495. var bookIdSymbolId = map[int]int{
  496. 1111: MAC,
  497. 4008: AUDJPY,
  498. 4007: AUDUSD,
  499. 4009: CHFJPY,
  500. 4016: EURAUD,
  501. 4015: EURCAD,
  502. 4011: EURCHF,
  503. 4003: EURGBP,
  504. 4006: EURJPY,
  505. 4001: EURUSD,
  506. 4017: GBPAUD,
  507. 4014: GBPCAD,
  508. 4012: GBPCHF,
  509. 4005: GBPJPY,
  510. 4002: GBPUSD,
  511. 4013: USDCAD,
  512. 4010: USDCHF,
  513. 4004: USDJPY,
  514. 100479: EURCZK,
  515. 100481: GBPCZK,
  516. 100483: USDCZK,
  517. 100485: EURDKK,
  518. 100487: GBPDKK,
  519. 100489: USDDKK,
  520. 100491: EURHKD,
  521. 100493: GBPHKD,
  522. 100495: USDHKD,
  523. 100497: EURHUF,
  524. 100499: GBPHUF,
  525. 100501: USDHUF,
  526. 100503: EURMXN,
  527. 100505: GBPMXN,
  528. 100507: USDMXN,
  529. 100509: EURNOK,
  530. 100511: GBPNOK,
  531. 100513: USDNOK,
  532. 100515: EURNZD,
  533. 100517: GBPNZD,
  534. 100519: EURPLN,
  535. 100521: GBPPLN,
  536. 100523: USDPLN,
  537. 100525: EURSEK,
  538. 100527: GBPSEK,
  539. 100529: USDSEK,
  540. 100531: EURSGD,
  541. 100533: GBPSGD,
  542. 100535: USDSGD,
  543. 100537: EURTRY,
  544. 100539: GBPTRY,
  545. 100541: USDTRY,
  546. 100543: EURZAR,
  547. 100545: GBPZAR,
  548. 100547: USDZAR,
  549. 100613: NZDUSD,
  550. 100615: AUDNZD,
  551. 100617: NZDJPY,
  552. 100619: AUDCHF,
  553. 100667: AUDCAD,
  554. 100671: CADCHF,
  555. 100669: CADJPY,
  556. 100673: NZDCAD,
  557. 100675: NZDCHF,
  558. 100677: NZDSGD,
  559. 100678: SGDJPY,
  560. 100679: XAGEUR,
  561. 100680: XAUEUR,
  562. 100681: ZARJPY,
  563. 100089: UK100,
  564. 100091: WS30,
  565. 100093: SPX,
  566. 100095: NDX,
  567. 100097: GDAXI,
  568. 100099: FCHI,
  569. 100101: STOXX50E,
  570. 100103: AEX,
  571. 100637: XAUUSD,
  572. 100639: XAGUSD,
  573. 100699: CLQ2,
  574. 100705: CLU2,
  575. 100711: CLV2,
  576. 100697: LCOQ2,
  577. 100703: LCOU2,
  578. 100709: LCOV2,
  579. 100659: GCQ2,
  580. 100695: LGON2,
  581. 100701: LGOQ2,
  582. 100707: LGOU2,
  583. }