-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
100 lines (86 loc) · 3.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<title>Derivative Exchange Lookup</title>
<meta name="description" content="Look up futures and options derivative exchange information by market code">
<meta name="keywords" content="Fixml, FIX, PostTrade, PostTrade, Derivative, Finance, Clearing, options, futures">
<meta name="author" content="Alek Shnayder">
<link href='https://fonts.googleapis.com/css?family=Work+Sans:200,400' rel='stylesheet' type='text/css'>
<link href="./style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./jquery-ui.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script src="./JS/ExchangeLookup.js"></script>
</head>
<body>
<div class="topBar">
<h1>Derivative Exchange Lookup</h1>
<div class="external">
<a href="https://github.com/Alek-S/Derivative-Exchange-Lookup" target="_blank">Github</a>
<a href="https://github.com/Alek-S/Derivative-Exchange-Lookup/issues" target="_blank">Report Issue</a>
</div>
</div>
<div class="description">
<p>Concise reference information about a derivative exchange from its market code.</p>
</div>
<div id="submitForm">
<form>
<input type="text" placeholder="Exchange code" id="autocomplete" class="exchInput"><button>Submit</button>
</form>
</div>
<div class="card">
<p id="fullname">OneChicago (Cleared by OCC)</p>
<div class="result" id="success">
<p id="website">website</p>
<p id="email">email</p>
<p id="holiday">holiday</p>
</div>
</div>
<script type="text/javascript">
$( "#autocomplete" ).autocomplete({
source: [ "CME", "CMECE", "CBOT", "CBT", "NYMEX", "COMEX", "CFE", "XCBF", "ICE", "IFUS", "IFEU", "OCC", "ONE", "NFX", "PBOT","ELX", "XELX", "EUREX", "LME", "SGX", "IMM", "KCBT", "MGEX", "MGE", "CCE", "MX", "BDM", "TMX", "CDCC", "Nadex", "LIFFE", "MEFF", "OMX", "DME", "KRX", "NSE", "BSE", "IEX", "HKEx", "SHFE", "ZCE", "SAFEX", "MexDer", "BVMF", "OMIP", "EEX", "ECC"]
});
$(document).ready(function(){
$('button').on('click', function(event){
event.preventDefault();
$('.card').hide();
var input = $('.exchInput').val().trim();
var result = exchange(input.toUpperCase());
//clear anything previous
$('#fullname').text(null);
$('#website').text(null);
$('#email').text(null);
$('#holiday').text(null);
//populate
if(input.length !== 0){
if(result.website === 'http://www.iotafinance.com/en/ISO-10383-Market-Identification-Codes-MIC.html'){
$('#fullname').text(result.name);
$('#website').append('"' + input + '"' + ' isn\'t a known exchange, or hasn\'t been added yet<br>');
$('#email').append('External Code Listing: <a href="' + result.website + '" target="_blank">Link</a>');
$('#holiday').append('Request Addition: ' + '<a href="https://github.com/Alek-S/Derivative-Exchange-Lookup/issues" target="_blank">Open Issue</a>');
$('.card').fadeIn( 400 );
}else if(result.website !== 'http://www.iotafinance.com/en/ISO-10383-Market-Identification-Codes-MIC.html'){
$('#fullname').text(result.name);
if( result.website.length != 0){
$('#website').append('Website: ' + '<a href="' + result.website + '" target="_blank">Link</a>');
} else {
$('#website').text('Website not available');
}
if( result.email.length != 0){
$('#email').append('Email: ' + '<a href="mailto:' + result.email + '">' + result.email +'</a>');
} else {
$('#email').text('Email not available');
}
if( result.holiday.length != 0){
$('#holiday').append('Holiday Calendar: ' + '<a href="' + result.holiday + '" target="_blank">Link</a>');
} else {
$('#holiday').text('Holiday not available');
}
$('.card').fadeIn( 400 );
}
}
});
});
</script>
</body>
</html>