forked from etherdelta/etherdelta.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
market_maker_config_schema.js
97 lines (94 loc) · 2.21 KB
/
market_maker_config_schema.js
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
// http://jsonschema.net/#/
const account = {
$schema: 'http://json-schema.org/draft-04/schema#',
type: 'object',
displayProperty: 'account',
properties: {
address: {
title: 'Address',
description: 'The Ethereum address',
type: 'string',
},
privateKey: {
title: 'Private key',
description: 'The Ethereum private key)',
type: 'string',
},
},
additionalProperties: false,
required: ['address'],
};
const pairs = {
$schema: 'http://json-schema.org/draft-04/schema#',
type: 'array',
items: {
type: 'object',
displayProperty: 'pair',
properties: {
pair: {
title: 'Pair',
description: 'The pair name should match what you see on EtherDelta, for example MKR/ETH',
type: 'string',
},
expires: {
title: 'Expires',
description: 'Number of blocks until your orders expire',
type: 'integer',
},
sellEnabled: {
title: 'Sell enabled',
description: 'Whether to enable sell orders',
type: 'string',
},
sellNum: {
title: 'Sell number',
description: 'Number of sell orders',
type: 'number',
},
sellVolume: {
title: 'Sell volume',
description: 'Formula for sell volume',
type: 'string',
},
sellPrice: {
title: 'Sell price',
description: 'Formula for sell price',
type: 'string',
},
buyPrice: {
title: 'Buy price',
description: 'Formula for buy price',
type: 'string',
},
buyVolume: {
title: 'Buy volume',
description: 'Formula for buy volume',
type: 'string',
},
buyNum: {
title: 'Buy number',
description: 'Number of buy orders',
type: 'number',
},
buyEnabled: {
title: 'Buy enabled',
description: 'Whether to enable buy orders',
type: 'string',
},
},
additionalProperties: false,
required: [
'pair',
'expires',
'sellEnabled',
'sellNum',
'sellVolume',
'sellPrice',
'buyPrice',
'buyVolume',
'buyNum',
'buyEnabled',
],
},
};
module.exports = { account, pairs };