localbitcoins 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +16 -19
  4. data/README.md +319 -35
  5. data/Rakefile +1 -1
  6. data/lib/localbitcoins/client/ads.rb +45 -9
  7. data/lib/localbitcoins/client/contacts.rb +66 -0
  8. data/lib/localbitcoins/client/escrows.rb +8 -12
  9. data/lib/localbitcoins/client/markets.rb +27 -0
  10. data/lib/localbitcoins/client/public.rb +78 -0
  11. data/lib/localbitcoins/client/users.rb +16 -0
  12. data/lib/localbitcoins/client/wallet.rb +28 -0
  13. data/lib/localbitcoins/client.rb +13 -1
  14. data/lib/localbitcoins/request.rb +11 -15
  15. data/lib/localbitcoins/version.rb +1 -1
  16. data/localbitcoins.gemspec +3 -3
  17. data/spec/client_spec.rb +397 -8
  18. data/spec/fixtures/account_info.json +14 -0
  19. data/spec/fixtures/ad_create.json +5 -0
  20. data/spec/fixtures/ad_list.json +103 -0
  21. data/spec/fixtures/ad_single.json +55 -0
  22. data/spec/fixtures/ad_update.json +5 -0
  23. data/spec/fixtures/ads.json +103 -0
  24. data/spec/fixtures/contact_message.json +5 -0
  25. data/spec/fixtures/contacts.json +52 -0
  26. data/spec/fixtures/contacts_active.json +165 -0
  27. data/spec/fixtures/contacts_active_buyers.json +60 -0
  28. data/spec/fixtures/contacts_active_sellers.json +111 -0
  29. data/spec/fixtures/contacts_cancel.json +5 -0
  30. data/spec/fixtures/contacts_canceled_contacts.json +162 -0
  31. data/spec/fixtures/contacts_closed_contacts.json +109 -0
  32. data/spec/fixtures/contacts_contact_info.json +52 -0
  33. data/spec/fixtures/contacts_contacts_info.json +111 -0
  34. data/spec/fixtures/contacts_create.json +10 -0
  35. data/spec/fixtures/contacts_messages.json +43 -0
  36. data/spec/fixtures/contacts_released_contacts.json +60 -0
  37. data/spec/fixtures/currencies.json +505 -0
  38. data/spec/fixtures/currency_ticker.json +236 -0
  39. data/spec/fixtures/escrow_release.json +5 -0
  40. data/spec/fixtures/escrows.json +24 -22
  41. data/spec/fixtures/local_buy_ads.json +93 -0
  42. data/spec/fixtures/local_sell_ads.json +93 -0
  43. data/spec/fixtures/logout.json +0 -0
  44. data/spec/fixtures/myself.json +14 -0
  45. data/spec/fixtures/online_buy_ads.json +637 -0
  46. data/spec/fixtures/online_sell_ads.json +2160 -0
  47. data/spec/fixtures/orderbook.json +1739 -0
  48. data/spec/fixtures/payment_methods.json +95 -0
  49. data/spec/fixtures/places.json +15 -0
  50. data/spec/fixtures/ticker.json +254 -0
  51. data/spec/fixtures/trades.json +3002 -0
  52. data/spec/fixtures/wallet.json +34 -0
  53. data/spec/fixtures/wallet_addr.json +6 -0
  54. data/spec/fixtures/wallet_balance.json +16 -0
  55. data/spec/fixtures/wallet_send.json +5 -0
  56. data/spec/spec_helper.rb +26 -29
  57. metadata +51 -7
@@ -0,0 +1,103 @@
1
+ {
2
+ "data": {
3
+ "ad_count": 2,
4
+ "ad_list": [
5
+ {
6
+ "data": {
7
+ "require_feedback_score": 90,
8
+ "reference_type": "SHORT",
9
+ "trusted_required": false,
10
+ "currency": "MXN",
11
+ "account_info": "",
12
+ "age_days_coefficient_limit": "4.00",
13
+ "first_time_limit_btc": "2.00",
14
+ "city": "Puerto Vallarta",
15
+ "location_string": "Puerto Vallarta, JAL, Mexico",
16
+ "countrycode": "MX",
17
+ "max_amount": null,
18
+ "lon": -105.22,
19
+ "sms_verification_required": false,
20
+ "require_trade_volume": 0.00,
21
+ "online_provider": "CASH_DEPOSIT",
22
+ "max_amount_available": null,
23
+ "msg": "Contact hours: Mon 09:00-17:00",
24
+ "email": "bob@domain.com",
25
+ "volume_coefficient_btc": "1.50",
26
+ "profile": {
27
+ "username": "Bob",
28
+ "feedback_score": 100,
29
+ "trade_count": "0",
30
+ "last_online": "2014-06-19T16:17:06+00:00",
31
+ "name": "Bob (30+;100%)"
32
+ },
33
+ "bank_name": "Banorte",
34
+ "trade_type": "ONLINE_SELL",
35
+ "ad_id": 12345,
36
+ "temp_price": "8000",
37
+ "min_amount": "500",
38
+ "track_max_amount": true,
39
+ "temp_price_usd": "615",
40
+ "lat": 20.64,
41
+ "price_equation": "localbitcoins_sell_usd",
42
+ "visible": false,
43
+ "created_at": "2014-06-17T15:15:07+00:00",
44
+ "atm_model": null
45
+ },
46
+ "actions": {
47
+ "html_form": "https://localbitcoins.com/ads_edit/12345",
48
+ "public_view": "https://localbitcoins.com/ad/12345",
49
+ "contact_form": "https://localbitcoins.com/api/contact_create/12345/",
50
+ "change_form": "https://localbitcoins.com/api/ad/12345/"
51
+ }
52
+ },
53
+ {
54
+ "data": {
55
+ "require_feedback_score": 85,
56
+ "reference_type": "SHORT",
57
+ "trusted_required": false,
58
+ "currency": "MXN",
59
+ "account_info": "",
60
+ "age_days_coefficient_limit": "4.00",
61
+ "first_time_limit_btc": "2.00",
62
+ "city": "Puerto Vallarta",
63
+ "location_string": "Puerto Vallarta, JAL, Mexico",
64
+ "countrycode": "MX",
65
+ "max_amount": "10000",
66
+ "min_amount": "500",
67
+ "lon": -105.22,
68
+ "sms_verification_required": true,
69
+ "require_trade_volume": 0.00,
70
+ "online_provider": "CASH_DEPOSIT",
71
+ "max_amount_available": null,
72
+ "msg": "Contact hours: Mon 09:00-17:00\n\nMeeting preferences: Starbucks\n",
73
+ "email": "bob@domain.com",
74
+ "volume_coefficient_btc": "1.50",
75
+ "profile": {
76
+ "username": "Bob",
77
+ "feedback_score": 100,
78
+ "trade_count": "0",
79
+ "last_online": "2014-06-19T16:17:06+00:00",
80
+ "name": "Bob (30+;100%)"
81
+ },
82
+ "bank_name": "",
83
+ "trade_type": "LOCAL_SELL",
84
+ "ad_id": 123456,
85
+ "temp_price": "9200",
86
+ "track_max_amount": true,
87
+ "temp_price_usd": "707",
88
+ "lat": 20.64,
89
+ "price_equation": "localbitcoins_sell_usd*1.15",
90
+ "visible": true,
91
+ "created_at": "2014-06-17T15:15:07+00:00",
92
+ "atm_model": null
93
+ },
94
+ "actions": {
95
+ "html_form": "https://localbitcoins.com/ads_edit/123456",
96
+ "public_view": "https://localbitcoins.com/ad/123456",
97
+ "contact_form": "https://localbitcoins.com/api/contact_create/123456/",
98
+ "change_form": "https://localbitcoins.com/api/ad/123456/"
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "data": {
3
+ "message": "Message sent successfully."
4
+ }
5
+ }
@@ -0,0 +1,52 @@
1
+ {"contact_list": {
2
+ "data": {
3
+ "created_at": "2013-12-06T15:23:01.61",
4
+ "buyer": {
5
+ "username": "hylje",
6
+ "trade_count": "30+",
7
+ "feedback_score": "100",
8
+ "name": "hylje (30+; 100)",
9
+ "last_seen_on": "2013-12-19T08:28:16+00:00"
10
+ },
11
+ "seller": {
12
+ "username": "jeremias",
13
+ "trade_count": "100+",
14
+ "feedback_score": "100",
15
+ "name": "jeremias (100+; 100)",
16
+ "last_seen_on": "2013-12-19T06:28:51+00:00"
17
+ },
18
+ "reference_code": "123",
19
+ "currency": "EUR",
20
+ "amount": "105.55",
21
+ "amount_btc": "190",
22
+ "exchange_rate_updated_at": "2013-06-20T15:23:01+00:00",
23
+ "advertisement": {
24
+ "id": 123,
25
+ "trade_type": "ONLINE_SELL"
26
+ "advertiser": {
27
+ "username": "jeremias",
28
+ "trade_count": "100+",
29
+ "feedback_score": "100",
30
+ "name": "jeremias (100+; 100)",
31
+ "last_seen_on": "2013-12-19T06:28:51.604754+00:00"
32
+ }
33
+ },
34
+ "contact_id": 1234
35
+ "canceled_at": null,
36
+ "escrowed_at": "2013-12-06T15:23:01+00:00",
37
+ "funded_at": "2013-12-06T15:23:01+00:00",
38
+ "disputed_at": null,
39
+ "closed_at": null,
40
+ "released_at": null,
41
+ "is_buying": true,
42
+ "is_selling": false,
43
+ "account_details": ! see below
44
+ },
45
+ "actions": {
46
+ "mark_as_paid_url": "/api/contact_mark_as_paid/1/",
47
+ "advertisement_public_view": "/ads/123",
48
+ "message_url": "/api/contact_messages/1234",
49
+ "message_post_url": "/api/contact_message_post/1234"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,165 @@
1
+ {
2
+ "data":{
3
+ "contact_list":[
4
+ {
5
+ "data":{
6
+ "exchange_rate_updated_at":"2014-06-19T19:50:43+00:00",
7
+ "advertisement":{
8
+ "advertiser":{
9
+ "username":"Bob",
10
+ "feedback_score":100,
11
+ "trade_count":"30+",
12
+ "last_online":"2014-06-20T15:36:31+00:00",
13
+ "name":"Bob (30+; 100%)"
14
+ },
15
+ "trade_type":"LOCAL_SELL",
16
+ "id":1234567
17
+ },
18
+ "is_buying":false,
19
+ "payment_completed_at":null,
20
+ "released_at":null,
21
+ "created_at":"2014-06-19T19:50:43+00:00",
22
+ "contact_id":799943,
23
+ "seller":{
24
+ "username":"Bob",
25
+ "feedback_score":100,
26
+ "trade_count":"30+",
27
+ "last_online":"2014-06-20T15:36:31+00:00",
28
+ "name":"Bob (30+; 100%)"
29
+ },
30
+ "currency":"MXN",
31
+ "amount":"1.00",
32
+ "is_selling":true,
33
+ "escrowed_at":null,
34
+ "amount_btc":"0.00009350",
35
+ "reference_code":"L791246BH58N",
36
+ "buyer":{
37
+ "username":"Alice",
38
+ "feedback_score":95,
39
+ "trade_count":"10+",
40
+ "last_online":"2014-06-19T21:07:22+00:00",
41
+ "name":"Alice (10+; 95%)"
42
+ },
43
+ "closed_at":null,
44
+ "disputed_at":null,
45
+ "funded_at":"2014-06-19T19:50:43+00:00",
46
+ "canceled_at":null
47
+ },
48
+ "actions":{
49
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/12345/",
50
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/1234567/",
51
+ "messages_url":"https://localbitcoins.com/api/contact_messages/12345/",
52
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/12345/",
53
+ "advertisement_public_view":"https://localbitcoins.com/ad/12345"
54
+ }
55
+ },
56
+ {
57
+ "data":{
58
+ "exchange_rate_updated_at":"2014-06-19T19:53:46+00:00",
59
+ "advertisement":{
60
+ "advertiser":{
61
+ "username":"Bob",
62
+ "feedback_score":100,
63
+ "trade_count":"30+",
64
+ "last_online":"2014-06-20T15:36:31+00:00",
65
+ "name":"Bob (30+; 100%)"
66
+ },
67
+ "trade_type":"LOCAL_SELL",
68
+ "id":1234567
69
+ },
70
+ "is_buying":false,
71
+ "payment_completed_at":null,
72
+ "released_at":null,
73
+ "created_at":"2014-06-19T19:53:46+00:00",
74
+ "contact_id":799953,
75
+ "seller":{
76
+ "username":"Bob",
77
+ "feedback_score":100,
78
+ "trade_count":"30+",
79
+ "last_online":"2014-06-20T15:36:31+00:00",
80
+ "name":"Bob (30+; 100%)"
81
+ },
82
+ "currency":"MXN",
83
+ "amount":"2.00",
84
+ "is_selling":true,
85
+ "escrowed_at":null,
86
+ "amount_btc":"0.00018700",
87
+ "reference_code":"L799B985H58X",
88
+ "buyer":{
89
+ "username":"Alice",
90
+ "feedback_score":95,
91
+ "trade_count":"10+",
92
+ "last_online":"2014-06-19T21:07:22+00:00",
93
+ "name":"Alice (10+; 95%)"
94
+ },
95
+ "closed_at":null,
96
+ "disputed_at":null,
97
+ "funded_at":"2014-06-19T19:53:46+00:00",
98
+ "canceled_at":null
99
+ },
100
+ "actions":{
101
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/12345/",
102
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/1234567/",
103
+ "messages_url":"https://localbitcoins.com/api/contact_messages/12345/",
104
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/12345/",
105
+ "advertisement_public_view":"https://localbitcoins.com/ad/12345"
106
+ }
107
+ },
108
+ {
109
+ "data":{
110
+ "exchange_rate_updated_at":"2014-06-19T20:35:05+00:00",
111
+ "advertisement":{
112
+ "advertiser":{
113
+ "username":"Alice",
114
+ "feedback_score":95,
115
+ "trade_count":"10+",
116
+ "last_online":"2014-06-19T21:07:22+00:00",
117
+ "name":"Alice (10+; 95%)"
118
+ },
119
+ "trade_type":"LOCAL_SELL",
120
+ "id":1234567
121
+ },
122
+ "is_buying":true,
123
+ "payment_completed_at":null,
124
+ "released_at":null,
125
+ "created_at":"2014-06-19T20:35:05+00:00",
126
+ "is_funded":false,
127
+ "contact_id":800082,
128
+ "seller":{
129
+ "username":"Alice",
130
+ "feedback_score":95,
131
+ "trade_count":"10+",
132
+ "last_online":"2014-06-19T21:07:22+00:00",
133
+ "name":"Alice (10+; 95%)"
134
+ },
135
+ "currency":"USD",
136
+ "amount":"0.10",
137
+ "is_selling":false,
138
+ "escrowed_at":"2014-06-19T20:38:32+00:00",
139
+ "amount_btc":"0.00010000",
140
+ "reference_code":"L808530BH5CI",
141
+ "buyer":{
142
+ "username":"Bob",
143
+ "feedback_score":100,
144
+ "trade_count":"30+",
145
+ "last_online":"2014-06-20T15:36:31+00:00",
146
+ "name":"Bob (30+; 100%)"
147
+ },
148
+ "closed_at":null,
149
+ "disputed_at":null,
150
+ "funded_at":null,
151
+ "canceled_at":null
152
+ },
153
+ "actions":{
154
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/123456/",
155
+ "messages_url":"https://localbitcoins.com/api/contact_messages/123456/",
156
+ "fund_url":"https://localbitcoins.com/api/contact_fund/123456/",
157
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/123456/",
158
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/1234567/",
159
+ "advertisement_public_view":"https://localbitcoins.com/ad/12345"
160
+ }
161
+ }
162
+ ],
163
+ "contact_count":3
164
+ }
165
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "data":{
3
+ "contact_list":[
4
+ {
5
+ "data":{
6
+ "exchange_rate_updated_at":"2014-06-20T16:44:33+00:00",
7
+ "advertisement":{
8
+ "advertiser":{
9
+ "username":"Alice",
10
+ "feedback_score":95,
11
+ "trade_count":"10+",
12
+ "last_online":"2014-06-19T21:07:22+00:00",
13
+ "name":"Alice (10+; 95%)"
14
+ },
15
+ "trade_type":"LOCAL_SELL",
16
+ "id":123456
17
+ },
18
+ "is_buying":true,
19
+ "payment_completed_at":null,
20
+ "released_at":null,
21
+ "created_at":"2014-06-20T16:44:33+00:00",
22
+ "contact_id":543210,
23
+ "seller":{
24
+ "username":"Alice",
25
+ "feedback_score":95,
26
+ "trade_count":"10+",
27
+ "last_online":"2014-06-19T21:07:22+00:00",
28
+ "name":"Alice (10+; 95%)"
29
+ },
30
+ "currency":"MXN",
31
+ "amount":"60.00",
32
+ "is_selling":false,
33
+ "escrowed_at":null,
34
+ "amount_btc":"0.10000",
35
+ "reference_code":"L802876C3764",
36
+ "buyer":{
37
+ "username":"Bob",
38
+ "feedback_score":100,
39
+ "trade_count":"30+",
40
+ "last_online":"2014-06-20T15:36:31+00:00",
41
+ "name":"Bob (30+; 100%)"
42
+ },
43
+ "closed_at":null,
44
+ "disputed_at":null,
45
+ "funded_at":"2014-06-20T16:44:34+00:00",
46
+ "canceled_at":null
47
+ },
48
+ "actions":{
49
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/543210/",
50
+ "messages_url":"https://localbitcoins.com/api/contact_messages/543210/",
51
+ "mark_as_paid_url":"https://localbitcoins.com/api/contact_mark_as_paid/543210/",
52
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/123456/",
53
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/543210/",
54
+ "advertisement_public_view":"https://localbitcoins.com/ad/123456"
55
+ }
56
+ }
57
+ ],
58
+ "contact_count":1
59
+ }
60
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "data":{
3
+ "contact_list":[
4
+ {
5
+ "data":{
6
+ "exchange_rate_updated_at":"2014-06-19T19:50:43+00:00",
7
+ "advertisement":{
8
+ "advertiser":{
9
+ "username":"Bob",
10
+ "feedback_score":100,
11
+ "trade_count":"30+",
12
+ "last_online":"2014-06-20T15:36:31+00:00",
13
+ "name":"Bob (30+; 100%)"
14
+ },
15
+ "trade_type":"LOCAL_SELL",
16
+ "id":123456
17
+ },
18
+ "is_buying":false,
19
+ "payment_completed_at":null,
20
+ "released_at":null,
21
+ "created_at":"2014-06-19T19:50:43+00:00",
22
+ "contact_id":543210,
23
+ "seller":{
24
+ "username":"Bob",
25
+ "feedback_score":100,
26
+ "trade_count":"30+",
27
+ "last_online":"2014-06-20T15:36:31+00:00",
28
+ "name":"Bob (30+; 100%)"
29
+ },
30
+ "currency":"MXN",
31
+ "amount":"1.00",
32
+ "is_selling":true,
33
+ "escrowed_at":null,
34
+ "amount_btc":"0.00009350",
35
+ "reference_code":"L799125C3BH58N",
36
+ "buyer":{
37
+ "username":"Alice",
38
+ "feedback_score":95,
39
+ "trade_count":"10+",
40
+ "last_online":"2014-06-19T21:07:22+00:00",
41
+ "name":"Alice (10+; 95%)"
42
+ },
43
+ "closed_at":null,
44
+ "disputed_at":null,
45
+ "funded_at":"2014-06-19T19:50:43+00:00",
46
+ "canceled_at":null
47
+ },
48
+ "actions":{
49
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/543210/",
50
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/123456/",
51
+ "messages_url":"https://localbitcoins.com/api/contact_messages/543210/",
52
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/543210/",
53
+ "advertisement_public_view":"https://localbitcoins.com/ad/123456"
54
+ }
55
+ },
56
+ {
57
+ "data":{
58
+ "exchange_rate_updated_at":"2014-06-19T19:53:46+00:00",
59
+ "advertisement":{
60
+ "advertiser":{
61
+ "username":"Bob",
62
+ "feedback_score":100,
63
+ "trade_count":"30+",
64
+ "last_online":"2014-06-20T15:36:31+00:00",
65
+ "name":"Bob (30+; 100%)"
66
+ },
67
+ "trade_type":"LOCAL_SELL",
68
+ "id":1234567
69
+ },
70
+ "is_buying":false,
71
+ "payment_completed_at":null,
72
+ "released_at":null,
73
+ "created_at":"2014-06-19T19:53:46+00:00",
74
+ "contact_id":654321,
75
+ "seller":{
76
+ "username":"Bob",
77
+ "feedback_score":100,
78
+ "trade_count":"30+",
79
+ "last_online":"2014-06-20T15:36:31+00:00",
80
+ "name":"Bob (30+; 100%)"
81
+ },
82
+ "currency":"MXN",
83
+ "amount":"2.00",
84
+ "is_selling":true,
85
+ "escrowed_at":null,
86
+ "amount_btc":"0.00018700",
87
+ "reference_code":"L79S6C9BH58X",
88
+ "buyer":{
89
+ "username":"Alice",
90
+ "feedback_score":95,
91
+ "trade_count":"10+",
92
+ "last_online":"2014-06-19T21:07:22+00:00",
93
+ "name":"Alice (10+; 95%)"
94
+ },
95
+ "closed_at":null,
96
+ "disputed_at":null,
97
+ "funded_at":"2014-06-19T19:53:46+00:00",
98
+ "canceled_at":null
99
+ },
100
+ "actions":{
101
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/654321/",
102
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/1234567/",
103
+ "messages_url":"https://localbitcoins.com/api/contact_messages/654321/",
104
+ "cancel_url":"https://localbitcoins.com/api/contact_cancel/654321/",
105
+ "advertisement_public_view":"https://localbitcoins.com/ad/1234567"
106
+ }
107
+ }
108
+ ],
109
+ "contact_count":2
110
+ }
111
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "data": {
3
+ "message": "Contact canceled."
4
+ }
5
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "data":{
3
+ "contact_list":[
4
+ {
5
+ "data":{
6
+ "exchange_rate_updated_at":"2014-06-19T20:32:45+00:00",
7
+ "advertisement":{
8
+ "advertiser":{
9
+ "username":"Bob",
10
+ "feedback_score":100,
11
+ "trade_count":"30+",
12
+ "last_online":"2014-06-20T15:36:31+00:00",
13
+ "name":"Bob (30+; 100%)"
14
+ },
15
+ "trade_type":"LOCAL_SELL",
16
+ "id":1234
17
+ },
18
+ "is_buying":false,
19
+ "payment_completed_at":null,
20
+ "released_at":null,
21
+ "created_at":"2014-06-19T20:32:45+00:00",
22
+ "contact_id":4321,
23
+ "seller":{
24
+ "username":"Bob",
25
+ "feedback_score":100,
26
+ "trade_count":"30+",
27
+ "last_online":"2014-06-20T15:36:31+00:00",
28
+ "name":"Bob (30+; 100%)"
29
+ },
30
+ "currency":"USD",
31
+ "amount":"800.00",
32
+ "is_selling":true,
33
+ "escrowed_at":null,
34
+ "amount_btc":"0.47320000",
35
+ "reference_code":"L8O9873BH5C9",
36
+ "buyer":{
37
+ "username":"Alice",
38
+ "feedback_score":95,
39
+ "trade_count":"10+",
40
+ "last_online":"2014-06-19T21:07:22+00:00",
41
+ "name":"Alice (10+; 95%)"
42
+ },
43
+ "closed_at":"2014-06-19T20:34:18+00:00",
44
+ "disputed_at":null,
45
+ "funded_at":null,
46
+ "canceled_at":"2014-06-19T20:34:18+00:00"
47
+ },
48
+ "actions":{
49
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/4321/",
50
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/1234/",
51
+ "messages_url":"https://localbitcoins.com/api/contact_messages/4321/",
52
+ "advertisement_public_view":"https://localbitcoins.com/ad/1234"
53
+ }
54
+ },
55
+ {
56
+ "data":{
57
+ "exchange_rate_updated_at":"2014-06-19T19:48:58+00:00",
58
+ "advertisement":{
59
+ "advertiser":{
60
+ "username":"Bob",
61
+ "feedback_score":100,
62
+ "trade_count":"30+",
63
+ "last_online":"2014-06-20T15:36:31+00:00",
64
+ "name":"Bob (30+; 100%)"
65
+ },
66
+ "trade_type":"LOCAL_SELL",
67
+ "id":12345
68
+ },
69
+ "is_buying":false,
70
+ "payment_completed_at":null,
71
+ "released_at":null,
72
+ "created_at":"2014-06-19T19:48:58+00:00",
73
+ "contact_id":54321,
74
+ "seller":{
75
+ "username":"Bob",
76
+ "feedback_score":100,
77
+ "trade_count":"30+",
78
+ "last_online":"2014-06-20T15:36:31+00:00",
79
+ "name":"Bob (30+; 100%)"
80
+ },
81
+ "currency":"MXN",
82
+ "amount":"108.46",
83
+ "is_selling":true,
84
+ "escrowed_at":null,
85
+ "amount_btc":"0.01000000",
86
+ "reference_code":"L7999P6CH58K",
87
+ "buyer":{
88
+ "username":"Alice",
89
+ "feedback_score":95,
90
+ "trade_count":"10+",
91
+ "last_online":"2014-06-19T21:07:22+00:00",
92
+ "name":"Alice (10+; 95%)"
93
+ },
94
+ "closed_at":"2014-06-19T19:49:10+00:00",
95
+ "disputed_at":null,
96
+ "funded_at":"2014-06-19T19:48:59+00:00",
97
+ "canceled_at":"2014-06-19T19:49:10+00:00"
98
+ },
99
+ "actions":{
100
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/54321/",
101
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/12345/",
102
+ "messages_url":"https://localbitcoins.com/api/contact_messages/54321/",
103
+ "advertisement_public_view":"https://localbitcoins.com/ad/12345"
104
+ }
105
+ },
106
+ {
107
+ "data":{
108
+ "exchange_rate_updated_at":"2014-06-19T18:44:14+00:00",
109
+ "advertisement":{
110
+ "advertiser":{
111
+ "username":"Bob",
112
+ "feedback_score":100,
113
+ "trade_count":"30+",
114
+ "last_online":"2014-06-20T15:36:31+00:00",
115
+ "name":"Bob (30+; 100%)"
116
+ },
117
+ "trade_type":"LOCAL_SELL",
118
+ "id":123456
119
+ },
120
+ "is_buying":true,
121
+ "payment_completed_at":null,
122
+ "released_at":null,
123
+ "created_at":"2014-06-19T18:44:14+00:00",
124
+ "is_funded":true,
125
+ "contact_id":654321,
126
+ "seller":{
127
+ "username":"Bob",
128
+ "feedback_score":100,
129
+ "trade_count":"30+",
130
+ "last_online":"2014-06-20T15:36:31+00:00",
131
+ "name":"Bob (30+; 100%)"
132
+ },
133
+ "currency":"MXN",
134
+ "amount":"100.02",
135
+ "is_selling":false,
136
+ "escrowed_at":"2014-06-19T18:48:08+00:00",
137
+ "amount_btc":"0.01000690",
138
+ "reference_code":"L799677CH51V",
139
+ "buyer":{
140
+ "username":"Alice",
141
+ "feedback_score":95,
142
+ "trade_count":"10+",
143
+ "last_online":"2014-06-19T21:07:22+00:00",
144
+ "name":"Alice (10+; 95%)"
145
+ },
146
+ "closed_at":"2014-06-19T18:56:45+00:00",
147
+ "disputed_at":null,
148
+ "funded_at":"2014-06-19T18:44:15+00:00",
149
+ "canceled_at":"2014-06-19T18:56:45+00:00"
150
+ },
151
+ "actions":{
152
+ "message_post_url":"https://localbitcoins.com/api/contact_message_post/654321/",
153
+ "advertisement_url":"https://localbitcoins.com/api/ad-get/123456/",
154
+ "messages_url":"https://localbitcoins.com/api/contact_messages/654321/",
155
+ "mark_as_paid_url":"https://localbitcoins.com/api/contact_mark_as_paid/654321/",
156
+ "advertisement_public_view":"https://localbitcoins.com/ad/123456"
157
+ }
158
+ }
159
+ ],
160
+ "contact_count":3
161
+ }
162
+ }