-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest.js
More file actions
113 lines (92 loc) · 3.02 KB
/
test.js
File metadata and controls
113 lines (92 loc) · 3.02 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
const lbtc = require('./unizend-localbtc')
require('dotenv').config()
lbtc.init(process.env.AUTH_KEY, process.env.AUTH_SECRET)
// 1.0.0
/* const vesPrice = lbtc.publicMarketData.adsList('sell', {
countryCode: 've',
countryName: 'venezuela'
}).then(response => {
console.log(response[1].data.payment_method)
}) */
/* const btcAverage = lbtc.publicMarketData.bitcoinAverage().then(response => {
console.log(response.VES)
}) */
/* const btcCharts = lbtc.publicMarketData.bitcoinCharts.orderBooks('VES').then(response => {
console.log(response.bids)
}) */
/* const paymentMethodList = lbtc.localbitcoins.getPaymentMethodsList('VE').then(response => {
console.log(response)
}) */
/* const paymentMethod = lbtc.localbitcoins.getPaymentMethod('transferwise', 've').then(response => {
console.log(response)
}) */
/* const countryCodes = lbtc.localbitcoins.getCountryCodes().then(response => {
console.log(response)
}) */
/* const currencies = lbtc.localbitcoins.getCurrencies().then(response => {
console.log(response.ETH)
}) */
/* const equation = lbtc.localbitcoins.getBTCPriceFromEquation('btc_in_usd*0.9').then(response => {
console.log(response)
}) */
/* const ads = lbtc.ads.get().then(response => {
console.log(response)
}) */
/* const user = lbtc.account.myself().then(response => {
console.log(response)
}) */
/* const vesPrice = lbtc.publicMarketData.adsList('sell', {
paymentMethod: 'transferwise'
}).then(response => {
console.log(response)
}) */
// 1.0.8
/* const btcAverage = lbtc.publicMarketData.bitcoinAverage('VES', '1h').then(response => {
console.log(response)
}) */
// lbtc.publicMarketData.adsList('sell', {
// countryCode: 've',
// countryName: 'venezuela'
// }, 2).then(response => {
// console.log(response)
// })
// lbtc.publicMarketData.bitcoinAverage()
// .then(response => {
// console.log(response)
// })
// lbtc.publicMarketData.customBTCAvgList({ VES: '1h', COP: '6h', MXN: '12h' })
// .then(response => {
// console.log(response)
// })
// lbtc.localbitcoins.getFees().then(res => {
// console.log(res)
// })
// lbtc.publicMarketData.adsList('sell', {
// countryCode: 've',
// countryName: 'venezuela'
// }, { page: 2 }).then(response => {
// console.log(response)
// })
// lbtc.ads.create({
// price_equation: 'btc_in_usd*USD_in_VES*1.3599999999999999',
// lat: 11.231970,
// lon: -74.200752,
// city: 'Santa Marta',
// location_string: 'Colombia',
// countrycode: 'co',
// currency: 'COP',
// bank_name: 'Bancolombia',
// account_info: '',
// msg: 'Este anuncio fue creado con la API de localbitcoins\r\n' + 'No oferte\r\n',
// sms_verification_required: false,
// track_max_amount: false,
// require_trusted_by_advertiser: true,
// require_identification: true,
// online_provider: 'CASH_DEPOSIT',
// trade_type: 'ONLINE_BUY'
// }).then(res => {
// console.log(res)
// })
lbtc.localbitcoins.getPaymentMethodsList().then(res => {
console.log(res)
})