forked from tarun1475/Nodejs-Bittrex-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.js
51 lines (44 loc) · 1.36 KB
/
constants.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
/**
* @module constants
*/
function define(obj, name, value) {
Object.defineProperty(obj, name, {
value: value,
enumerable: true,
writable: false,
configurable: false
});
}
/**
* Standard Response flags
*/
exports.responseFlags = {};
define(exports.responseFlags, "ACTION_FAILED" , 144);
define(exports.responseFlags, "ACTION_COMPLETE" , 143);
define(exports.responseFlags, "NOT_LOGGED_IN" , 401);
define(exports.responseFlags, "NOT_AUTHORIZED" , 403);
define(exports.responseFlags, "INTERNAL_SERVER_ERR" , 500);
define(exports.responseFlags, "NOT_FOUND" , 404);
/**
* Bittrex Base Urls
*/
exports.baseUrl = {};
define(exports.baseUrl, "PUBLIC" , "https://bittrex.com/api/v1.1/public");
define(exports.baseUrl, "MARKET" , "https://bittrex.com/api/v1.1/market");
define(exports.baseUrl, "ACCOUNT" , "https://bittrex.com/api/v1.1/account");
/**
* Common response sent during database execution error
* @type {{log: string, flag: number}}
*/
exports.databaseErrorResponse = {
"log": "Server execution error",
"flag": 144
};
/**
* Common response sent during missing parameters
* @type {{log: string, flag: number}}
*/
exports.parameterMissingResponse = {
"log": "Some parameters are missing/invalid",
"flag": 144
};