bank_of_thailand 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +8 -0
  3. data/CHANGELOG.md +15 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +293 -0
  6. data/Rakefile +12 -0
  7. data/docs/openapi_spec/average-exchange-rate-thb--foreign-currency-2_0_2.json +778 -0
  8. data/docs/openapi_spec/botlicensecheckapi-1_0_2.json +122 -0
  9. data/docs/openapi_spec/debt-securities-auction-result-current-2_0_0.json +201 -0
  10. data/docs/openapi_spec/debt-securities-auction-result-current_2.0.0.json +201 -0
  11. data/docs/openapi_spec/deposit-interest-rates-for-individuals-of-commercial-banks-percent-per-annum-2_0_0.json +354 -0
  12. data/docs/openapi_spec/financial-institutions-holidays-1_0_1.json +98 -0
  13. data/docs/openapi_spec/interbank-transaction-rates-percent-per-annum-2_0_0.json +224 -0
  14. data/docs/openapi_spec/loan-interest-rates-of-commercial-banks-percent-per-annum-2_0_0.json +335 -0
  15. data/docs/openapi_spec/search-series_1.0.0.json +177 -0
  16. data/docs/openapi_spec/swap-point-onshore-in-satangs-2_0_0.json +196 -0
  17. data/docs/openapi_spec/thai-baht-implied-interest-rates-percent-per-annum-2_0_0.json +182 -0
  18. data/docs/openapi_spec/weighted-average-interbank-exchange-rate-thb--usd-2_0_1.json +546 -0
  19. data/lib/bank_of_thailand/client.rb +188 -0
  20. data/lib/bank_of_thailand/configuration.rb +88 -0
  21. data/lib/bank_of_thailand/errors.rb +46 -0
  22. data/lib/bank_of_thailand/resource.rb +34 -0
  23. data/lib/bank_of_thailand/resources/average_exchange_rate.rb +81 -0
  24. data/lib/bank_of_thailand/resources/deposit_rate.rb +46 -0
  25. data/lib/bank_of_thailand/resources/exchange_rate.rb +103 -0
  26. data/lib/bank_of_thailand/resources/financial_holidays.rb +30 -0
  27. data/lib/bank_of_thailand/resources/implied_rate.rb +39 -0
  28. data/lib/bank_of_thailand/resources/interbank_rate.rb +39 -0
  29. data/lib/bank_of_thailand/resources/interest_rate.rb +49 -0
  30. data/lib/bank_of_thailand/resources/loan_rate.rb +45 -0
  31. data/lib/bank_of_thailand/resources/search_series.rb +37 -0
  32. data/lib/bank_of_thailand/resources/statistics.rb +80 -0
  33. data/lib/bank_of_thailand/resources/swap_point.rb +38 -0
  34. data/lib/bank_of_thailand/version.rb +5 -0
  35. data/lib/bank_of_thailand.rb +56 -0
  36. data/sig/bank_of_thailand.rbs +4 -0
  37. metadata +211 -0
@@ -0,0 +1,335 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Loan Interest Rates of Commercial Banks (Percent per annum)",
5
+ "description": "",
6
+ "version": "2.0.0",
7
+ "x-ibm-name": "loan-interest-rates-of-commercial-banks-percent-per-annum"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://gateway.api.bot.or.th/LoanRate/v2"
12
+ }
13
+ ],
14
+ "security": [
15
+ {
16
+ "clientIdHeader": []
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/loan_rate/": {
21
+ "get": {
22
+ "description": "Loan Interest Rates of Commercial Banks (Percent per annum) <br> <br> Refers to the announced loan interest rate of commercial banks, classified by loan type such as MOR (Minimun Overdraft Rate), MLR (Minimun Loan Rate) and MRR (Minimun Retail Rate) etc <br> Frequency : Daily <br> Lag time : -- <br> Release schedule : Every business day at 2.00 p.m. <br> Source of data : Commercial Banks registered in Thailand and Foreign Bank Branches <br> More detail [CLICK](https://www.bot.or.th/th/statistics/interest-rate.html)",
23
+ "parameters": [
24
+ {
25
+ "name": "start_period",
26
+ "in": "query",
27
+ "description": "Start Period Date (YYYY-MM-DD) EX. 2017-06-30",
28
+ "required": true,
29
+ "schema": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ {
34
+ "name": "end_period",
35
+ "in": "query",
36
+ "description": "End Preiod Date (YYYY-MM-DD) EX. 2017-06-30",
37
+ "required": true,
38
+ "schema": {
39
+ "type": "string"
40
+ }
41
+ }
42
+ ],
43
+ "responses": {
44
+ "200": {
45
+ "description": "200 OK",
46
+ "content": {
47
+ "application/json": {
48
+ "schema": {
49
+ "$ref": "#/components/schemas/Loan%20Interest%20Rates%20of%20Commercial%20Banks%20(Percent%20per%20annum)%20Response%20Parameters"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "/avg_loan_rate/": {
58
+ "get": {
59
+ "description": "Average Loan Interest Rates of Commercial Banks (Percent per annum) <br> <br> Refers to the announced loan interest rate of commercial banks, classified by loan type such as MOR (Minimun Overdraft Rate), MLR (Minimun Loan Rate) and MRR (Minimun Retail Rate) etc <br> Frequency : Daily <br> Lag time : -- <br> Release schedule : Every business day at 2.00 p.m. <br> Source of data : Commercial Banks registered in Thailand and Foreign Bank Branches <br> More detail [CLICK](https://www.bot.or.th/th/statistics/interest-rate.html)",
60
+ "parameters": [
61
+ {
62
+ "name": "start_period",
63
+ "in": "query",
64
+ "description": "Start Period Date (YYYY-MM-DD) EX. 2017-06-30",
65
+ "required": true,
66
+ "schema": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ {
71
+ "name": "end_period",
72
+ "in": "query",
73
+ "description": "End Preiod Date (YYYY-MM-DD) EX. 2017-06-30",
74
+ "required": true,
75
+ "schema": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ ],
80
+ "responses": {
81
+ "200": {
82
+ "description": "200 OK",
83
+ "content": {
84
+ "application/json": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/Average%20Loan%20Interest%20Rates%20of%20Commercial%20Banks%20(Percent%20per%20annum)%20Response%20Parameters"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "components": {
96
+ "schemas": {
97
+ "Loan Interest Rates of Commercial Banks (Percent per annum) Response Parameters": {
98
+ "type": "object",
99
+ "properties": {
100
+ "result": {
101
+ "type": "object",
102
+ "properties": {
103
+ "api": {
104
+ "type": "string",
105
+ "example": "Loan Interest Rates of Commercial Banks (Percent per annum)"
106
+ },
107
+ "timestamp": {
108
+ "type": "string",
109
+ "example": "2017-07-24 16:43:48"
110
+ },
111
+ "data": {
112
+ "type": "object",
113
+ "properties": {
114
+ "data_detail": {
115
+ "type": "object",
116
+ "properties": {
117
+ "period": {
118
+ "type": "string"
119
+ },
120
+ "bank_type_name_th": {
121
+ "type": "string"
122
+ },
123
+ "bank_type_name_eng": {
124
+ "type": "string"
125
+ },
126
+ "bank_name_th": {
127
+ "type": "string"
128
+ },
129
+ "bank_name_eng": {
130
+ "type": "string"
131
+ },
132
+ "mor": {
133
+ "type": "string"
134
+ },
135
+ "mlr": {
136
+ "type": "string"
137
+ },
138
+ "mrr": {
139
+ "type": "string"
140
+ },
141
+ "ceiling_rate": {
142
+ "type": "string"
143
+ },
144
+ "default_rate": {
145
+ "type": "string"
146
+ },
147
+ "creditcard_min": {
148
+ "type": "string"
149
+ },
150
+ "creditcard_max": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "example": [
155
+ {
156
+ "period": "2016-04-04",
157
+ "bank_type_name_th": "ธนาคารพาณิชย์จดทะเบียนในประเทศ",
158
+ "bank_type_name_eng": "Commercial Banks registered in Thailand",
159
+ "bank_name_th": "กรุงเทพ",
160
+ "bank_name_eng": "Bangkok Bank",
161
+ "mor": "7.3750",
162
+ "mlr": "6.5000",
163
+ "mrr": "7.8750",
164
+ "ceiling_rate": "18.0000",
165
+ "default_rate": "22.8750",
166
+ "creditcard_min": "20.0000",
167
+ "creditcard_max": "20.0000"
168
+ },
169
+ {
170
+ "period": "2016-04-04",
171
+ "bank_type_name_th": "ธนาคารพาณิชย์จดทะเบียนในประเทศ",
172
+ "bank_type_name_eng": "Commercial Banks registered in Thailand",
173
+ "bank_name_th": "กรุงไทย",
174
+ "bank_name_eng": "Krung Thai Bank",
175
+ "mor": "7.3750",
176
+ "mlr": "6.5250",
177
+ "mrr": "7.8750",
178
+ "ceiling_rate": "17.8750",
179
+ "default_rate": "19.8750",
180
+ "creditcard_min": "",
181
+ "creditcard_max": ""
182
+ },
183
+ {
184
+ "period": "2016-04-04",
185
+ "bank_type_name_th": "สาขาธนาคารต่างประเทศ",
186
+ "bank_type_name_eng": "Foreign Bank Branches",
187
+ "bank_name_th": "มิซูโฮ",
188
+ "bank_name_eng": "Mizuho Bank",
189
+ "mor": "9.8750",
190
+ "mlr": "6.7500",
191
+ "mrr": "7.7500",
192
+ "ceiling_rate": "28.0000",
193
+ "default_rate": "28.0000",
194
+ "creditcard_min": "",
195
+ "creditcard_max": ""
196
+ },
197
+ {
198
+ "period": "2016-04-04",
199
+ "bank_type_name_th": "สาขาธนาคารต่างประเทศ",
200
+ "bank_type_name_eng": "Foreign Bank Branches",
201
+ "bank_name_th": "บีเอ็นพี พารีบาส์",
202
+ "bank_name_eng": "BNP Paribas",
203
+ "mor": "8.0000",
204
+ "mlr": "8.0000",
205
+ "mrr": "",
206
+ "ceiling_rate": "8.0000",
207
+ "default_rate": "19.0000",
208
+ "creditcard_min": "",
209
+ "creditcard_max": ""
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ }
215
+ }
216
+ }
217
+ },
218
+ "description": ""
219
+ },
220
+ "Average Loan Interest Rates of Commercial Banks (Percent per annum) Response Parameters": {
221
+ "type": "object",
222
+ "properties": {
223
+ "result": {
224
+ "type": "object",
225
+ "properties": {
226
+ "api": {
227
+ "type": "string",
228
+ "example": "Average Loan Interest Rates of Commercial Banks (Percent per annum)"
229
+ },
230
+ "timestamp": {
231
+ "type": "string",
232
+ "example": "2017-07-24 16:46:27"
233
+ },
234
+ "data": {
235
+ "type": "object",
236
+ "properties": {
237
+ "data_detail": {
238
+ "type": "object",
239
+ "properties": {
240
+ "period": {
241
+ "type": "string"
242
+ },
243
+ "name_th": {
244
+ "type": "string"
245
+ },
246
+ "name_eng": {
247
+ "type": "string"
248
+ },
249
+ "mor": {
250
+ "type": "string"
251
+ },
252
+ "mlr": {
253
+ "type": "string"
254
+ },
255
+ "mrr": {
256
+ "type": "string"
257
+ },
258
+ "ceiling_rate": {
259
+ "type": "string"
260
+ },
261
+ "default_rate": {
262
+ "type": "string"
263
+ },
264
+ "creditcard_min": {
265
+ "type": "string"
266
+ },
267
+ "creditcard_max": {
268
+ "type": "string"
269
+ }
270
+ },
271
+ "example": [
272
+ {
273
+ "period": "2016-01-04",
274
+ "name_th": "เฉลี่ยของธนาคารพาณิชย์จดทะเบียนในประเทศ",
275
+ "name_eng": "Average of Commercial Banks registered in Thailand",
276
+ "mor": "7.9166",
277
+ "mlr": "7.0971",
278
+ "mrr": "8.3883",
279
+ "ceiling_rate": "23.0182",
280
+ "default_rate": "24.7879",
281
+ "creditcard_min": "19.4444",
282
+ "creditcard_max": "19.4444"
283
+ },
284
+ {
285
+ "period": "2016-01-04",
286
+ "name_th": "เฉลี่ยของสาขาธนาคารต่างประเทศ",
287
+ "name_eng": "Average of Foreign Bank Branches",
288
+ "mor": "8.4375",
289
+ "mlr": "7.7813",
290
+ "mrr": "8.8125",
291
+ "ceiling_rate": "17.7075",
292
+ "default_rate": "24.1567",
293
+ "creditcard_min": "20.0000",
294
+ "creditcard_max": "20.0000"
295
+ }
296
+ ]
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "description": ""
304
+ }
305
+ },
306
+ "parameters": {
307
+ "start_period": {
308
+ "name": "start_period",
309
+ "in": "query",
310
+ "description": "Start Period Date (YYYY-MM-DD) EX. 2017-06-30",
311
+ "required": true,
312
+ "schema": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "end_period": {
317
+ "name": "end_period",
318
+ "in": "query",
319
+ "description": "End Preiod Date (YYYY-MM-DD) EX. 2017-06-30",
320
+ "required": true,
321
+ "schema": {
322
+ "type": "string"
323
+ }
324
+ }
325
+ },
326
+ "securitySchemes": {
327
+ "clientIdHeader": {
328
+ "type": "apiKey",
329
+ "name": "Authorization",
330
+ "in": "header"
331
+ }
332
+ }
333
+ },
334
+ "x-original-swagger-version": "2.0"
335
+ }
@@ -0,0 +1,177 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Search Stat APIs",
5
+ "description": "ผู้ใช้บริการสามารถค้นหาข้อมูล BOT API ในกลุ่มสถิติ โดยกำหนดคำค้น keyword ตัวอย่างเช่น series code, series name หรือคำที่ต้องการ โดยบริการค้นหา Search Stat APIs จะแสดงผลการค้นหาแต่ละครั้งไม่เกิน 100 series\n\nUser can look for data in BOT API Statistics by keyword search using series code, series name, or relevant terms. The result will be displayed up to 100 series per search.",
6
+ "version": "1.0.0",
7
+ "x-ibm-name": "search-series"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://gateway.api.bot.or.th/search-series"
12
+ }
13
+ ],
14
+ "security": [
15
+ {
16
+ "clientIdHeader": []
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/": {
21
+ "get": {
22
+ "parameters": [
23
+ {
24
+ "name": "keyword",
25
+ "in": "query",
26
+ "description": "keyword for search series",
27
+ "required": true,
28
+ "schema": {
29
+ "type": "string"
30
+ }
31
+ }
32
+ ],
33
+ "responses": {
34
+ "200": {
35
+ "description": "200 OK",
36
+ "content": {
37
+ "application/xml": {
38
+ "schema": {
39
+ "$ref": "#/components/schemas/Response Parameters"
40
+ }
41
+ },
42
+ "application/json": {
43
+ "schema": {
44
+ "$ref": "#/components/schemas/Response Parameters"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "components": {
54
+ "schemas": {
55
+ "Response Parameters": {
56
+ "type": "object",
57
+ "properties": {
58
+ "result": {
59
+ "type": "object",
60
+ "properties": {
61
+ "api": {
62
+ "type": "string",
63
+ "example": "Search Stat APIs"
64
+ },
65
+ "timestamp": {
66
+ "type": "string",
67
+ "example": "2018-07-23 17:34:14"
68
+ },
69
+ "series_details": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "series_code": {
75
+ "type": "string",
76
+ "example": "PF00000000Q00232"
77
+ },
78
+ "observation_start": {
79
+ "type": "string",
80
+ "example": "2003-Q4้"
81
+ },
82
+ "observation_end": {
83
+ "type": "string",
84
+ "example": "2018-Q1"
85
+ },
86
+ "series_name_th": {
87
+ "type": "string",
88
+ "example": "ยอดรวมตราสารหนี้"
89
+ },
90
+ "series_name_eng": {
91
+ "type": "string",
92
+ "example": "Government debt securities_Total"
93
+ },
94
+ "series_categories": {
95
+ "type": "object",
96
+ "properties": {},
97
+ "example": []
98
+ },
99
+ "frequency": {
100
+ "type": "string",
101
+ "example": "Quarterly"
102
+ },
103
+ "frequency_short": {
104
+ "type": "string",
105
+ "example": "Q"
106
+ },
107
+ "unit_th": {
108
+ "type": "string",
109
+ "example": "ล้านบาท"
110
+ },
111
+ "data_type": {
112
+ "type": "string",
113
+ "example": "Stock"
114
+ },
115
+ "seasonal_adjustment_flag": {
116
+ "type": "string",
117
+ "example": "N"
118
+ },
119
+ "last_updated_date": {
120
+ "type": "string",
121
+ "example": "2018-04-30"
122
+ },
123
+ "source_of_data_th": {
124
+ "type": "string",
125
+ "example": "1. ธนาคารแห่งประเทศไทย 2. สำนักบริหารหนี้สาธารณะ กระทรวงการคลัง 3. บริษัทศูนย์รับฝากหลักทรัพย์ (ประเทศไทย) จำกัด 4. ผู้ดูแลและเก็บรักษาหลักทรัพย์"
126
+ },
127
+ "source_of_data_eng": {
128
+ "type": "string",
129
+ "example": "1. Bank of Thailand 2. The Public Debt Management Office, Ministry of Finance 3. Thailand Securities Depository Co., Ltd. (TSD) 4. Custodians"
130
+ },
131
+ "lag_time": {
132
+ "type": "string",
133
+ "example": "1 Month"
134
+ },
135
+ "release_schedule_th": {
136
+ "type": "string",
137
+ "example": "วันทำการสุดท้ายของเดือนถัดไป"
138
+ },
139
+ "release_schedule_eng": {
140
+ "type": "string",
141
+ "example": "The last business day of the following month"
142
+ },
143
+ "annotation_th": {
144
+ "type": "string",
145
+ "example": ""
146
+ },
147
+ "annotation_eng": {
148
+ "type": "string",
149
+ "example": ""
150
+ },
151
+ "description_th": {
152
+ "type": "string",
153
+ "example": "ยอดรวมตราสารหนี้"
154
+ },
155
+ "description_eng": {
156
+ "type": "string",
157
+ "example": "Total of the outstanding Government debt securities"
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "description": ""
166
+ }
167
+ },
168
+ "securitySchemes": {
169
+ "clientIdHeader": {
170
+ "type": "apiKey",
171
+ "name": "Authorization",
172
+ "in": "header"
173
+ }
174
+ }
175
+ },
176
+ "x-original-swagger-version": "2.0"
177
+ }