crypto-nodes
Version:
128 lines (104 loc) • 3.6 kB
HTML
<!-- Assertion selector css Block -->
<script type="text/javascript">
RED.nodes.registerType('bitmexConnector', {
category: 'crypto',
color: '#C0DEED',
defaults: {
disabled: { value: false },
api_key: { value: "" },
api_secret: { value: "" },
server_api: { value: "https://testnet.bitmex.com" },
test: { value: true }
},
inputs: 1,
outputs: 1,
icon: "bitmex.png",
label: function () {
return 'BitMEX Data';
},
inputLabels: [],
outputLabels: [],
oneditprepare: function() {
},
});
RED.nodes.registerType('bitmexOrder', {
category: 'crypto',
color: '#C0DEED',
defaults: {
name: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "bitmex.png",
label: function () {
return this.name || 'Bitmex Order';
},
inputLabels: [],
outputLabels: [],
oneditprepare: function() {
},
});
RED.nodes.registerType('bitmexBalance', {
category: 'crypto',
color: '#C0DEED',
defaults: {
name: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "bitmex.png",
label: function () {
return this.name || 'Bitmex Balance';
},
inputLabels: [],
outputLabels: [],
oneditprepare: function() {
},
});
</script>
<script type="text/x-red" data-template-name="bitmexConnector">
<div class="form-row">
<label for="node-input-disabled"><i class="icon-tag"></i> Disable </label>
<input type="checkbox" id="node-input-disabled">
</div>
<div class="form-row">
<label for="node-input-api_key"><i class="icon-tag"></i> API Key </label>
<input type="text" id="node-input-api_key" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-api_secret"><i class="icon-tag"></i> API Secret </label>
<input type="text" id="node-input-api_secret" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server_api"><i class="icon-tag"></i> API Server </label>
<select id="node-input-server_api">
<option value="https://www.bitmex.com">https://www.bitmex.com</option>
<option value="https://testnet.bitmex.com">https://testnet.bitmex.com</option>
</select>
</div>
<div class="form-row">
<label for="node-input-test"><i class="icon-tag"></i> Test </label>
<input type="checkbox" id="node-input-test">
</div>
</script>
<script type="text/x-red" data-help-name="bitmexConnector">
<p>Retreives all bitmex orderbook data</p>
</script>
<script type="text/x-red" data-template-name="bitmexOrder">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name </label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="bitmexOrder">
<p>Sends an order to bitmex</p>
</script>
<script type="text/x-red" data-template-name="bitmexBalance">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name </label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="bitmexBalance">
<p>Retreices bitmex balance</p>
</script>