localbitcoins 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.gitignore +2 -0
- data/Gemfile.lock +16 -19
- data/README.md +319 -35
- data/Rakefile +1 -1
- data/lib/localbitcoins/client/ads.rb +45 -9
- data/lib/localbitcoins/client/contacts.rb +66 -0
- data/lib/localbitcoins/client/escrows.rb +8 -12
- data/lib/localbitcoins/client/markets.rb +27 -0
- data/lib/localbitcoins/client/public.rb +78 -0
- data/lib/localbitcoins/client/users.rb +16 -0
- data/lib/localbitcoins/client/wallet.rb +28 -0
- data/lib/localbitcoins/client.rb +13 -1
- data/lib/localbitcoins/request.rb +11 -15
- data/lib/localbitcoins/version.rb +1 -1
- data/localbitcoins.gemspec +3 -3
- data/spec/client_spec.rb +397 -8
- data/spec/fixtures/account_info.json +14 -0
- data/spec/fixtures/ad_create.json +5 -0
- data/spec/fixtures/ad_list.json +103 -0
- data/spec/fixtures/ad_single.json +55 -0
- data/spec/fixtures/ad_update.json +5 -0
- data/spec/fixtures/ads.json +103 -0
- data/spec/fixtures/contact_message.json +5 -0
- data/spec/fixtures/contacts.json +52 -0
- data/spec/fixtures/contacts_active.json +165 -0
- data/spec/fixtures/contacts_active_buyers.json +60 -0
- data/spec/fixtures/contacts_active_sellers.json +111 -0
- data/spec/fixtures/contacts_cancel.json +5 -0
- data/spec/fixtures/contacts_canceled_contacts.json +162 -0
- data/spec/fixtures/contacts_closed_contacts.json +109 -0
- data/spec/fixtures/contacts_contact_info.json +52 -0
- data/spec/fixtures/contacts_contacts_info.json +111 -0
- data/spec/fixtures/contacts_create.json +10 -0
- data/spec/fixtures/contacts_messages.json +43 -0
- data/spec/fixtures/contacts_released_contacts.json +60 -0
- data/spec/fixtures/currencies.json +505 -0
- data/spec/fixtures/currency_ticker.json +236 -0
- data/spec/fixtures/escrow_release.json +5 -0
- data/spec/fixtures/escrows.json +24 -22
- data/spec/fixtures/local_buy_ads.json +93 -0
- data/spec/fixtures/local_sell_ads.json +93 -0
- data/spec/fixtures/logout.json +0 -0
- data/spec/fixtures/myself.json +14 -0
- data/spec/fixtures/online_buy_ads.json +637 -0
- data/spec/fixtures/online_sell_ads.json +2160 -0
- data/spec/fixtures/orderbook.json +1739 -0
- data/spec/fixtures/payment_methods.json +95 -0
- data/spec/fixtures/places.json +15 -0
- data/spec/fixtures/ticker.json +254 -0
- data/spec/fixtures/trades.json +3002 -0
- data/spec/fixtures/wallet.json +34 -0
- data/spec/fixtures/wallet_addr.json +6 -0
- data/spec/fixtures/wallet_balance.json +16 -0
- data/spec/fixtures/wallet_send.json +5 -0
- data/spec/spec_helper.rb +26 -29
- metadata +51 -7
@@ -0,0 +1,95 @@
|
|
1
|
+
{
|
2
|
+
"data":{
|
3
|
+
"methods":{
|
4
|
+
"cashu":{
|
5
|
+
"code":"CASHU",
|
6
|
+
"name":"CashU"
|
7
|
+
},
|
8
|
+
"moneygram":{
|
9
|
+
"code":"MONEYGRAM",
|
10
|
+
"name":"Moneygram"
|
11
|
+
},
|
12
|
+
"cashiers-check":{
|
13
|
+
"code":"CASHIERS_CHECK",
|
14
|
+
"name":"Cashier's check"
|
15
|
+
},
|
16
|
+
"solidtrustpay":{
|
17
|
+
"code":"SOLIDTRUSTPAY",
|
18
|
+
"name":"SolidTrustPay"
|
19
|
+
},
|
20
|
+
"neteller":{
|
21
|
+
"code":"NETELLER",
|
22
|
+
"name":"Neteller"
|
23
|
+
},
|
24
|
+
"dwolla":{
|
25
|
+
"code":"DWOLLA",
|
26
|
+
"name":"Dwolla"
|
27
|
+
},
|
28
|
+
"venmo":{
|
29
|
+
"code":"VENMO",
|
30
|
+
"name":"Venmo"
|
31
|
+
},
|
32
|
+
"western-union":{
|
33
|
+
"code":"WU",
|
34
|
+
"name":"Western Union"
|
35
|
+
},
|
36
|
+
"okpay":{
|
37
|
+
"code":"OKPAY",
|
38
|
+
"name":"OKPay"
|
39
|
+
},
|
40
|
+
"webmoney":{
|
41
|
+
"code":"WEBMONEY",
|
42
|
+
"name":"WebMoney"
|
43
|
+
},
|
44
|
+
"paypal":{
|
45
|
+
"code":"PAYPAL",
|
46
|
+
"name":"Paypal"
|
47
|
+
},
|
48
|
+
"transferwise":{
|
49
|
+
"code":"TRANSFERWISE",
|
50
|
+
"name":"Transferwise"
|
51
|
+
},
|
52
|
+
"international-wire-swift":{
|
53
|
+
"code":"INTERNATIONAL_WIRE_SWIFT",
|
54
|
+
"name":"International Wire (SWIFT)"
|
55
|
+
},
|
56
|
+
"chase-quickpay":{
|
57
|
+
"code":"CHASE_QUICKPAY",
|
58
|
+
"name":"Chase Quickpay"
|
59
|
+
},
|
60
|
+
"ukash":{
|
61
|
+
"code":"UKASH",
|
62
|
+
"name":"Ukash"
|
63
|
+
},
|
64
|
+
"egopay":{
|
65
|
+
"code":"EGOPAY",
|
66
|
+
"name":"EgoPay"
|
67
|
+
},
|
68
|
+
"payza":{
|
69
|
+
"code":"PAYZA",
|
70
|
+
"name":"Payza"
|
71
|
+
},
|
72
|
+
"vanilla":{
|
73
|
+
"code":"VANILLA",
|
74
|
+
"name":"Vanilla"
|
75
|
+
},
|
76
|
+
"moneypak":{
|
77
|
+
"code":"MONEYPAK",
|
78
|
+
"name":"MoneyPak"
|
79
|
+
},
|
80
|
+
"perfect-money":{
|
81
|
+
"code":"PERFECT_MONEY",
|
82
|
+
"name":"Perfect Money"
|
83
|
+
},
|
84
|
+
"moneybookers-skrill":{
|
85
|
+
"code":"MONEYBOOKERS",
|
86
|
+
"name":"Moneybookers / Skrill"
|
87
|
+
},
|
88
|
+
"postal-order":{
|
89
|
+
"code":"POSTAL_ORDER",
|
90
|
+
"name":"Postal order"
|
91
|
+
}
|
92
|
+
},
|
93
|
+
"method_count":22
|
94
|
+
}
|
95
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"data":{
|
3
|
+
"place_count":1,
|
4
|
+
"places":[
|
5
|
+
{
|
6
|
+
"sell_local_url":"https://localbitcoins.com/sell-bitcoins-with-cash/1167206720/hainan-qinghai-china/.json",
|
7
|
+
"location_string":"Hainan, Qinghai, China",
|
8
|
+
"url":"/places/1167206720/hainan-qinghai-china/",
|
9
|
+
"lon":100.62,
|
10
|
+
"lat":36.29,
|
11
|
+
"buy_local_url":"https://localbitcoins.com/buy-bitcoins-with-cash/1167206720/hainan-qinghai-china/.json"
|
12
|
+
}
|
13
|
+
]
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,254 @@
|
|
1
|
+
{
|
2
|
+
"USD": {
|
3
|
+
"volume_btc": "701.42",
|
4
|
+
"rates": {
|
5
|
+
"last": "788.84"
|
6
|
+
},
|
7
|
+
"avg_1h": 660.420606879495,
|
8
|
+
"avg_24h": 664.5695346750073,
|
9
|
+
"avg_12h": 657.6815151523989
|
10
|
+
},
|
11
|
+
"EUR": {
|
12
|
+
"volume_btc": "85.42",
|
13
|
+
"rates": {
|
14
|
+
"last": "452.50"
|
15
|
+
},
|
16
|
+
"avg_1h": 463.77194567124445,
|
17
|
+
"avg_24h": 454.4632525932924,
|
18
|
+
"avg_12h": 449.5967212406517
|
19
|
+
},
|
20
|
+
"GBP": {
|
21
|
+
"volume_btc": "317.50",
|
22
|
+
"rates": {
|
23
|
+
"last": "360.50"
|
24
|
+
},
|
25
|
+
"avg_1h": 354.12965075380663,
|
26
|
+
"avg_24h": 355.7484403884706,
|
27
|
+
"avg_12h": 354.44049678075265
|
28
|
+
},
|
29
|
+
"CAD": {
|
30
|
+
"volume_btc": "25.11",
|
31
|
+
"rates": {
|
32
|
+
"last": "677.96"
|
33
|
+
},
|
34
|
+
"avg_1h": 677.96,
|
35
|
+
"avg_24h": 671.3124110986765,
|
36
|
+
"avg_12h": 667.0765174196147
|
37
|
+
},
|
38
|
+
"PLN": {
|
39
|
+
"volume_btc": "1.00",
|
40
|
+
"rates": {
|
41
|
+
"last": "1709.27"
|
42
|
+
},
|
43
|
+
"avg_1h": 1709.27,
|
44
|
+
"avg_24h": 1707.2601557006528,
|
45
|
+
"avg_12h": 1709.27
|
46
|
+
},
|
47
|
+
"MXN": {
|
48
|
+
"volume_btc": "2.67",
|
49
|
+
"rates": {
|
50
|
+
"last": "8431.10"
|
51
|
+
},
|
52
|
+
"avg_1h": 0,
|
53
|
+
"avg_24h": 8187.444456823468,
|
54
|
+
"avg_12h": 0
|
55
|
+
},
|
56
|
+
"RUB": {
|
57
|
+
"volume_btc": "10.52",
|
58
|
+
"rates": {
|
59
|
+
"last": "22511.60"
|
60
|
+
},
|
61
|
+
"avg_1h": 22511.6,
|
62
|
+
"avg_24h": 22102.205823526056,
|
63
|
+
"avg_12h": 21773.350680874046
|
64
|
+
},
|
65
|
+
"SEK": {
|
66
|
+
"volume_btc": "13.11",
|
67
|
+
"rates": {
|
68
|
+
"last": "3928.82"
|
69
|
+
},
|
70
|
+
"avg_1h": 3928.82,
|
71
|
+
"avg_24h": 4145.840120709915,
|
72
|
+
"avg_12h": 4131.485494136438
|
73
|
+
},
|
74
|
+
"CHF": {
|
75
|
+
"volume_btc": "3.55",
|
76
|
+
"rates": {
|
77
|
+
"last": "589.61"
|
78
|
+
},
|
79
|
+
"avg_1h": 0,
|
80
|
+
"avg_24h": 593.110163116971,
|
81
|
+
"avg_12h": 588.4081964456557
|
82
|
+
},
|
83
|
+
"MYR": {
|
84
|
+
"volume_btc": "2.42",
|
85
|
+
"rates": {
|
86
|
+
"last": "1954.98"
|
87
|
+
},
|
88
|
+
"avg_1h": 0,
|
89
|
+
"avg_24h": 1986.8631521514487,
|
90
|
+
"avg_12h": 1976.6712280701754
|
91
|
+
},
|
92
|
+
"CNY": {
|
93
|
+
"volume_btc": "0.72",
|
94
|
+
"rates": {
|
95
|
+
"last": "3914.61"
|
96
|
+
},
|
97
|
+
"avg_1h": 0,
|
98
|
+
"avg_24h": 3911.7316694607434,
|
99
|
+
"avg_12h": 3919.8493657580616
|
100
|
+
},
|
101
|
+
"BRL": {
|
102
|
+
"volume_btc": "3.79",
|
103
|
+
"rates": {
|
104
|
+
"last": "1522.19"
|
105
|
+
},
|
106
|
+
"avg_1h": 0,
|
107
|
+
"avg_24h": 1515.636988243977,
|
108
|
+
"avg_12h": 1522.19
|
109
|
+
},
|
110
|
+
"INR": {
|
111
|
+
"volume_btc": "5.11",
|
112
|
+
"rates": {
|
113
|
+
"last": "38217.14"
|
114
|
+
},
|
115
|
+
"avg_1h": 38217.14,
|
116
|
+
"avg_24h": 36708.500887068396,
|
117
|
+
"avg_12h": 36545.699133483016
|
118
|
+
},
|
119
|
+
"NOK": {
|
120
|
+
"volume_btc": "5.16",
|
121
|
+
"rates": {
|
122
|
+
"last": "3974.19"
|
123
|
+
},
|
124
|
+
"avg_1h": 0,
|
125
|
+
"avg_24h": 3550.5028184266093,
|
126
|
+
"avg_12h": 3605.221322146032
|
127
|
+
},
|
128
|
+
"ARS": {
|
129
|
+
"volume_btc": "8.46",
|
130
|
+
"rates": {
|
131
|
+
"last": "7148.44"
|
132
|
+
},
|
133
|
+
"avg_1h": 7172.261084750712,
|
134
|
+
"avg_24h": 7046.409674871722,
|
135
|
+
"avg_12h": 7169.677958124983
|
136
|
+
},
|
137
|
+
"DKK": {
|
138
|
+
"volume_btc": "0.85",
|
139
|
+
"rates": {
|
140
|
+
"last": "3527.33"
|
141
|
+
},
|
142
|
+
"avg_1h": 0,
|
143
|
+
"avg_24h": 3527.1999694333413,
|
144
|
+
"avg_12h": 3527.33
|
145
|
+
},
|
146
|
+
"ZAR": {
|
147
|
+
"volume_btc": "2.83",
|
148
|
+
"rates": {
|
149
|
+
"last": "6150.62"
|
150
|
+
},
|
151
|
+
"avg_1h": 0,
|
152
|
+
"avg_24h": 6224.389300622612,
|
153
|
+
"avg_12h": 6146.936116916646
|
154
|
+
},
|
155
|
+
"AUD": {
|
156
|
+
"volume_btc": "88.74",
|
157
|
+
"rates": {
|
158
|
+
"last": "788.74"
|
159
|
+
},
|
160
|
+
"avg_1h": 0,
|
161
|
+
"avg_24h": 676.9580227183087,
|
162
|
+
"avg_12h": 683.5682354772343
|
163
|
+
},
|
164
|
+
"NZD": {
|
165
|
+
"volume_btc": "7.17",
|
166
|
+
"rates": {
|
167
|
+
"last": "722.06"
|
168
|
+
},
|
169
|
+
"avg_1h": 0,
|
170
|
+
"avg_24h": 733.8252067129436,
|
171
|
+
"avg_12h": 732.0521629434954
|
172
|
+
},
|
173
|
+
"HKD": {
|
174
|
+
"volume_btc": "15.07",
|
175
|
+
"rates": {
|
176
|
+
"last": "4457.12"
|
177
|
+
},
|
178
|
+
"avg_1h": 0,
|
179
|
+
"avg_24h": 4496.430797398633,
|
180
|
+
"avg_12h": 4462.339508025274
|
181
|
+
},
|
182
|
+
"THB": {
|
183
|
+
"volume_btc": "27.49",
|
184
|
+
"rates": {
|
185
|
+
"last": "19386.77"
|
186
|
+
},
|
187
|
+
"avg_1h": 0,
|
188
|
+
"avg_24h": 18863.753622199027,
|
189
|
+
"avg_12h": 18863.753622199027
|
190
|
+
},
|
191
|
+
"KES": {
|
192
|
+
"volume_btc": "0.04",
|
193
|
+
"rates": {
|
194
|
+
"last": "53193.68"
|
195
|
+
},
|
196
|
+
"avg_1h": 0,
|
197
|
+
"avg_24h": 53193.68,
|
198
|
+
"avg_12h": 53193.68
|
199
|
+
},
|
200
|
+
"SGD": {
|
201
|
+
"volume_btc": "0.36",
|
202
|
+
"rates": {
|
203
|
+
"last": "844.65"
|
204
|
+
},
|
205
|
+
"avg_1h": 0,
|
206
|
+
"avg_24h": 843.6755849268841,
|
207
|
+
"avg_12h": 843.6755849268841
|
208
|
+
},
|
209
|
+
"CZK": {
|
210
|
+
"volume_btc": "0.68",
|
211
|
+
"rates": {
|
212
|
+
"last": "12821.08"
|
213
|
+
},
|
214
|
+
"avg_1h": 0,
|
215
|
+
"avg_24h": 12270.99295154185,
|
216
|
+
"avg_12h": 12270.99295154185
|
217
|
+
},
|
218
|
+
"PHP": {
|
219
|
+
"volume_btc": "0.20",
|
220
|
+
"rates": {
|
221
|
+
"last": "24559.67"
|
222
|
+
},
|
223
|
+
"avg_1h": 0,
|
224
|
+
"avg_24h": 24559.67,
|
225
|
+
"avg_12h": 24559.67
|
226
|
+
},
|
227
|
+
"HUF": {
|
228
|
+
"volume_btc": "0.07",
|
229
|
+
"rates": {
|
230
|
+
"last": "143500.00"
|
231
|
+
},
|
232
|
+
"avg_1h": 0,
|
233
|
+
"avg_24h": 143500.0,
|
234
|
+
"avg_12h": 143500.0
|
235
|
+
},
|
236
|
+
"COP": {
|
237
|
+
"volume_btc": "2.02",
|
238
|
+
"rates": {
|
239
|
+
"last": "1245503.95"
|
240
|
+
},
|
241
|
+
"avg_1h": 1165891.2430251515,
|
242
|
+
"avg_24h": 1165463.4873579685,
|
243
|
+
"avg_12h": 1165463.4873579685
|
244
|
+
},
|
245
|
+
"RON": {
|
246
|
+
"volume_btc": "0.19",
|
247
|
+
"rates": {
|
248
|
+
"last": "2022.71"
|
249
|
+
},
|
250
|
+
"avg_1h": 2022.71,
|
251
|
+
"avg_24h": 1855.774245029554,
|
252
|
+
"avg_12h": 1855.774245029554
|
253
|
+
}
|
254
|
+
}
|