-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfip.js
78 lines (50 loc) · 1.44 KB
/
fip.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
const bitbnsApi = require('./index');
const bitbns = new bitbnsApi({
apiKey : 'your_public_key',
apiSecretKey : 'your_private_key'
});
////// Find out list of all FIP
////// status (ENUM) - COMPLETE/ONGOING/UPCOMING/DISTRIBUTED
/// COMPLETE - allocation complete, ONGOING - ongoing allocations, UPCOMING - About to start FIP, DISTRIBUTED - Matured and balance redistributed
bitbns.listAllFIP({
type : 'ONGOING'
},function(error, data) {
console.log(data);
});
////// Enroll for a FIP
bitbns.enrollForFIP({
fip_id : 441,
amt: 500
},function(error, data) {
console.log(data);
});
////// Get all investments so far in FIP (Returns last 100) - can be called with or without fip_id
bitbns.getFIPTransactions({
fip_id : 441
},function(error, data) {
console.log(data);
});
bitbns.getFIPTransactions({
},function(error, data) {
console.log(data);
});
////// Get all my ongoing investments (FIPs - last 100)
bitbns.getOngoingFIP({
},function(error, data) {
console.log(data);
console.log(data.data[0].fip_details);
});
////// Pre subscribe for FIP (Balance is locked only during FIP enrolment)
bitbns.preSubscribeForFIP({
fip_id : 452,
amt: 500
},function(error, data) {
console.log(data);
console.log(data.data[0].fip_details);
});
////// Fetch my pre subscription list
bitbns.fetchMySubscriptions({
},function(error, data) {
console.log(data);
console.log(data.data[0].fip_details);
});