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,122 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "BOTLicenseCheckAPI",
5
+ "description": "API สำหรับการเรียกดูข้อมูลใบอนุญาตหรือใบขึ้นทะเบียนให้ประกอบธุรกิจที่อยู่ภายใต้การกำกับของธนาคารแห่งประเทศไทย เช่น P-Loan, Nano Finance, e-Money",
6
+ "version": "1.0.2",
7
+ "x-ibm-name": "botlicensecheckapi"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://gateway.api.bot.or.th/BotLicenseCheckAPI/"
12
+ }
13
+ ],
14
+ "security": [
15
+ {
16
+ "clientIdHeader": []
17
+ }
18
+ ],
19
+ "tags": [],
20
+ "paths": {
21
+ "/SearchAuthorized": {
22
+ "get": {
23
+ "parameters": [
24
+ {
25
+ "name": "keyword",
26
+ "in": "query",
27
+ "description": "คำค้นหา",
28
+ "required": true,
29
+ "schema": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ {
34
+ "name": "page",
35
+ "in": "query",
36
+ "description": "ตำแหน่งของหน้า",
37
+ "schema": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ {
42
+ "name": "limit",
43
+ "in": "query",
44
+ "description": "จำนวนของผลลัพธ์",
45
+ "schema": {
46
+ "type": "integer",
47
+ "format": "int32"
48
+ }
49
+ }
50
+ ],
51
+ "responses": {
52
+ "200": {
53
+ "description": "200 OK",
54
+ "content": {}
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "/License": {
60
+ "get": {
61
+ "parameters": [
62
+ {
63
+ "name": "authId",
64
+ "in": "query",
65
+ "description": "Id ในระบบของผู้ที่ได้รับอนุญาต",
66
+ "required": true,
67
+ "schema": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ {
72
+ "name": "docId",
73
+ "in": "query",
74
+ "description": "เลขที่อ้างอิงเอกสาร",
75
+ "required": true,
76
+ "schema": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ ],
81
+ "responses": {
82
+ "200": {
83
+ "description": "200 OK",
84
+ "content": {}
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "/AuthorizedDetail": {
90
+ "get": {
91
+ "parameters": [
92
+ {
93
+ "name": "id",
94
+ "in": "query",
95
+ "description": "Id ในระบบของผู้ที่ได้รับอนุญาต",
96
+ "required": true,
97
+ "schema": {
98
+ "type": "integer",
99
+ "format": "int32"
100
+ }
101
+ }
102
+ ],
103
+ "responses": {
104
+ "200": {
105
+ "description": "200 OK",
106
+ "content": {}
107
+ }
108
+ }
109
+ }
110
+ }
111
+ },
112
+ "components": {
113
+ "securitySchemes": {
114
+ "clientIdHeader": {
115
+ "type": "apiKey",
116
+ "name": "Authorization",
117
+ "in": "header"
118
+ }
119
+ }
120
+ },
121
+ "x-original-swagger-version": "2.0"
122
+ }
@@ -0,0 +1,201 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Debt Securities Auction Result (Current)",
5
+ "description": "Provide the result of Debt securities auction. <br>\nFrequency : Following to the auction schedule <br>\nLag time : -- <br>\nRelease schedule : when the auction is approved <br>\nSource of data : Bank of Thailand <br>\nMore detail [CLICK](https://www.bot.or.th/en/our-services/bond-and-debt-securities-services/DebtSecurities-Auction-Schedule-and-Result.html) <br>\n<u>Remark</u> BOT has provided more information, such as Classification of Financial Instrument code (cfi_code) and Auction Status (auction_st), on API responses starting September 29, 2017 onward.",
6
+ "version": "2.0.0",
7
+ "x-ibm-name": "debt-securities-auction-result-current"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://gateway.api.bot.or.th/BondAuction/bond_auction_v2/"
12
+ }
13
+ ],
14
+ "security": [
15
+ {
16
+ "clientIdHeader": []
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/": {
21
+ "get": {
22
+ "parameters": [
23
+ {
24
+ "name": "start_period",
25
+ "in": "query",
26
+ "description": "Start Period Date (YYYY-MM-DD) EX. 2017-06-31",
27
+ "required": true,
28
+ "schema": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ {
33
+ "name": "end_period",
34
+ "in": "query",
35
+ "description": "End Period Date (YYYY-MM-DD) EX. 2017-06-31",
36
+ "required": true,
37
+ "schema": {
38
+ "type": "string"
39
+ }
40
+ }
41
+ ],
42
+ "responses": {
43
+ "200": {
44
+ "description": "200 OK",
45
+ "content": {
46
+ "application/json": {
47
+ "schema": {
48
+ "$ref": "#/components/schemas/Response%20Parameters"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "components": {
58
+ "schemas": {
59
+ "Response Parameters": {
60
+ "type": "object",
61
+ "properties": {
62
+ "result": {
63
+ "type": "object",
64
+ "properties": {
65
+ "api": {
66
+ "type": "string",
67
+ "example": "Bond Auction"
68
+ },
69
+ "timestamp": {
70
+ "type": "string",
71
+ "example": "2017-10-03 08:53:51"
72
+ },
73
+ "data": {
74
+ "type": "object",
75
+ "properties": {
76
+ "data_detail": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "auction_date": {
82
+ "type": "string",
83
+ "example": "2017-09-26"
84
+ },
85
+ "debt_securities_type": {
86
+ "type": "string",
87
+ "example": "Government Bonds"
88
+ },
89
+ "thaibma_symbol": {
90
+ "type": "string",
91
+ "example": "LB233A"
92
+ },
93
+ "isin_code": {
94
+ "type": "string",
95
+ "example": "TH0623033303"
96
+ },
97
+ "auction_nm_th": {
98
+ "type": "string",
99
+ "example": "พันธบัตรรัฐบาลในปีงบประมาณ พ.ศ.2560 ครั้งที่ 1-Test API"
100
+ },
101
+ "cfi_code": {
102
+ "type": "string",
103
+ "example": "DBFTFR"
104
+ },
105
+ "re_open_from_th": {
106
+ "type": "string",
107
+ "example": "พันธบัตรรัฐบาลในปีงบประมาณ พ.ศ.2551 ครั้งที่ 4"
108
+ },
109
+ "coupon_rate": {
110
+ "type": "string",
111
+ "example": "5.5"
112
+ },
113
+ "time_to_maturity": {
114
+ "type": "string",
115
+ "example": "5.46 Yrs"
116
+ },
117
+ "payment_date": {
118
+ "type": "string",
119
+ "example": "2017-09-28"
120
+ },
121
+ "start_date_of_interest_earning_period": {
122
+ "type": "string",
123
+ "example": "2017-09-13"
124
+ },
125
+ "maturity_date": {
126
+ "type": "string",
127
+ "example": "2023-03-13"
128
+ },
129
+ "issue_amount_ncb_cb": {
130
+ "type": "string",
131
+ "example": "2000.0000000"
132
+ },
133
+ "accepted_amount_ncb_cb": {
134
+ "type": "string",
135
+ "example": "2000.0000000"
136
+ },
137
+ "accepted_amount_ncb": {
138
+ "type": "string",
139
+ "example": ""
140
+ },
141
+ "accepted_amount_cb": {
142
+ "type": "string",
143
+ "example": "2000.0000000"
144
+ },
145
+ "greenshoe_option_amount": {
146
+ "type": "string",
147
+ "example": "400.0000000"
148
+ },
149
+ "pao_amount": {
150
+ "type": "string",
151
+ "example": ""
152
+ },
153
+ "over_allotment_amount": {
154
+ "type": "string",
155
+ "example": ""
156
+ },
157
+ "grand_total_amount": {
158
+ "type": "string",
159
+ "example": "2400.0000000"
160
+ },
161
+ "accepted_lowest_yield": {
162
+ "type": "string",
163
+ "example": "1.7070000"
164
+ },
165
+ "accepted_highest_yield": {
166
+ "type": "string",
167
+ "example": "1.7090000"
168
+ },
169
+ "weighted_average_accepted_yield": {
170
+ "type": "string",
171
+ "example": "1.7077000"
172
+ },
173
+ "bid_coverage_ratio": {
174
+ "type": "string",
175
+ "example": "2.2000000"
176
+ },
177
+ "auction_st": {
178
+ "type": "string",
179
+ "example": "Approve"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "description": ""
190
+ }
191
+ },
192
+ "securitySchemes": {
193
+ "clientIdHeader": {
194
+ "type": "apiKey",
195
+ "name": "Authorization",
196
+ "in": "header"
197
+ }
198
+ }
199
+ },
200
+ "x-original-swagger-version": "2.0"
201
+ }
@@ -0,0 +1,201 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Debt Securities Auction Result (Current)",
5
+ "description": "Provide the result of Debt securities auction. <br>\nFrequency : Following to the auction schedule <br>\nLag time : -- <br>\nRelease schedule : when the auction is approved <br>\nSource of data : Bank of Thailand <br>\nMore detail [CLICK](https://www.bot.or.th/en/our-services/bond-and-debt-securities-services/DebtSecurities-Auction-Schedule-and-Result.html) <br>\n<u>Remark</u> BOT has provided more information, such as Classification of Financial Instrument code (cfi_code) and Auction Status (auction_st), on API responses starting September 29, 2017 onward.",
6
+ "version": "2.0.0",
7
+ "x-ibm-name": "debt-securities-auction-result-current"
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://gateway.api.bot.or.th/BondAuction/bond_auction_v2/"
12
+ }
13
+ ],
14
+ "security": [
15
+ {
16
+ "clientIdHeader": []
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/": {
21
+ "get": {
22
+ "parameters": [
23
+ {
24
+ "name": "start_period",
25
+ "in": "query",
26
+ "description": "Start Period Date (YYYY-MM-DD) EX. 2017-06-31",
27
+ "required": true,
28
+ "schema": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ {
33
+ "name": "end_period",
34
+ "in": "query",
35
+ "description": "End Period Date (YYYY-MM-DD) EX. 2017-06-31",
36
+ "required": true,
37
+ "schema": {
38
+ "type": "string"
39
+ }
40
+ }
41
+ ],
42
+ "responses": {
43
+ "200": {
44
+ "description": "200 OK",
45
+ "content": {
46
+ "application/json": {
47
+ "schema": {
48
+ "$ref": "#/components/schemas/Response Parameters"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "components": {
58
+ "schemas": {
59
+ "Response Parameters": {
60
+ "type": "object",
61
+ "properties": {
62
+ "result": {
63
+ "type": "object",
64
+ "properties": {
65
+ "api": {
66
+ "type": "string",
67
+ "example": "Bond Auction"
68
+ },
69
+ "timestamp": {
70
+ "type": "string",
71
+ "example": "2017-10-03 08:53:51"
72
+ },
73
+ "data": {
74
+ "type": "object",
75
+ "properties": {
76
+ "data_detail": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "auction_date": {
82
+ "type": "string",
83
+ "example": "2017-09-26"
84
+ },
85
+ "debt_securities_type": {
86
+ "type": "string",
87
+ "example": "Government Bonds"
88
+ },
89
+ "thaibma_symbol": {
90
+ "type": "string",
91
+ "example": "LB233A"
92
+ },
93
+ "isin_code": {
94
+ "type": "string",
95
+ "example": "TH0623033303"
96
+ },
97
+ "auction_nm_th": {
98
+ "type": "string",
99
+ "example": "พันธบัตรรัฐบาลในปีงบประมาณ พ.ศ.2560 ครั้งที่ 1-Test API"
100
+ },
101
+ "cfi_code": {
102
+ "type": "string",
103
+ "example": "DBFTFR"
104
+ },
105
+ "re_open_from_th": {
106
+ "type": "string",
107
+ "example": "พันธบัตรรัฐบาลในปีงบประมาณ พ.ศ.2551 ครั้งที่ 4"
108
+ },
109
+ "coupon_rate": {
110
+ "type": "string",
111
+ "example": "5.5"
112
+ },
113
+ "time_to_maturity": {
114
+ "type": "string",
115
+ "example": "5.46 Yrs"
116
+ },
117
+ "payment_date": {
118
+ "type": "string",
119
+ "example": "2017-09-28"
120
+ },
121
+ "start_date_of_interest_earning_period": {
122
+ "type": "string",
123
+ "example": "2017-09-13"
124
+ },
125
+ "maturity_date": {
126
+ "type": "string",
127
+ "example": "2023-03-13"
128
+ },
129
+ "issue_amount_ncb_cb": {
130
+ "type": "string",
131
+ "example": "2000.0000000"
132
+ },
133
+ "accepted_amount_ncb_cb": {
134
+ "type": "string",
135
+ "example": "2000.0000000"
136
+ },
137
+ "accepted_amount_ncb": {
138
+ "type": "string",
139
+ "example": ""
140
+ },
141
+ "accepted_amount_cb": {
142
+ "type": "string",
143
+ "example": "2000.0000000"
144
+ },
145
+ "greenshoe_option_amount": {
146
+ "type": "string",
147
+ "example": "400.0000000"
148
+ },
149
+ "pao_amount": {
150
+ "type": "string",
151
+ "example": ""
152
+ },
153
+ "over_allotment_amount": {
154
+ "type": "string",
155
+ "example": ""
156
+ },
157
+ "grand_total_amount": {
158
+ "type": "string",
159
+ "example": "2400.0000000"
160
+ },
161
+ "accepted_lowest_yield": {
162
+ "type": "string",
163
+ "example": "1.7070000"
164
+ },
165
+ "accepted_highest_yield": {
166
+ "type": "string",
167
+ "example": "1.7090000"
168
+ },
169
+ "weighted_average_accepted_yield": {
170
+ "type": "string",
171
+ "example": "1.7077000"
172
+ },
173
+ "bid_coverage_ratio": {
174
+ "type": "string",
175
+ "example": "2.2000000"
176
+ },
177
+ "auction_st": {
178
+ "type": "string",
179
+ "example": "Approve"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "description": ""
190
+ }
191
+ },
192
+ "securitySchemes": {
193
+ "clientIdHeader": {
194
+ "type": "apiKey",
195
+ "name": "Authorization",
196
+ "in": "header"
197
+ }
198
+ }
199
+ },
200
+ "x-original-swagger-version": "2.0"
201
+ }