Thai Stock 2D API is to get thai 2d set, value and result for 11:00 AM, 12:00 PM, 3:00 PM and 4:30 PM.
To get live live and result for current day. https://api.thaistock2d.com/live
curl https://api.thaistock2d.com/live | json_pp
Here's some example Json
{
"live": {
"set": "1,626.27",
"value": "85,650.24",
"time": "2021-11-04 16:12:40",
"twod": "70"
},
"result": [
{
"set": "1,623.03",
"value": "42,311.39",
"open_time": "11:00:00",
"twod": "31"
},
{
"set": "1,621.55",
"value": "53,762.32",
"open_time": "12:01:00",
"twod": "52"
},
{
"set": "1,622.37",
"value": "67,016.57",
"open_time": "15:00:00",
"twod": "76"
},
{
"set": "1,626.27",
"value": "85,650.24",
"open_time": "16:30:00",
"twod": "70"
}
]
}
This api can get 2D final result of last 10 days. Also you can get 2D final result by Date.
For Last 10 days https://api.thaistock2d.com/2d_result
curl https://api.thaistock2d.com/2d_result | json_pp
Final result by Date https://api.thaistock2d.com/2d_result?date=01-11-2021
curl ttps://api.thaistock2d.com/2d_result?date=01-11-2021 | json_pp
Here's some example Json
For Last 10 days Example Data
[
{
"child": [
{
"time": "11:00:00",
"set": "1,621.05",
"value": "27,982.10",
"twod": "52"
},
{
"time": "12:01:00",
"set": "1,622.89",
"value": "35,908.91",
"twod": "98"
},
...
]
]
This api can get 2D final result history.
curl https://api.thaistock2d.com/2d_history?twod=97&date=2021-11-26 | json_pp
Here's some example Json
[
{
"date": "2021-11-26",
"child": [
{
"time": "11:04:18",
"set": "1,632.10",
"value": "46,328.42",
"twod": "08",
"is_result": "off"
},
{
"time": "11:04:03",
"set": "1,631.64",
"value": "46,263.83",
"twod": "43",
"is_result": "off"
},
{
"time": "11:04:01",
"set": "1,631.64",
"value": "46,217.68",
"twod": "47",
"is_result": "off"
},
{
"time": "11:03:48",
"set": "1,631.97",
"value": "46,217.68",
"twod": "77",
"is_result": "off"
},
{
"time": "11:00:00",
"set": "1,633.79",
"value": "45,017.89",
"twod": "97",
"is_result": "on"
},
{
"time": "11:03:33",
"set": "1,631.50",
"value": "46,168.95",
"twod": "08",
"is_result": "off"
},
{
"time": "10:56:48",
"set": "1,633.35",
"value": "44,439.74",
"twod": "59",
"is_result": "off"
},
{
"time": "10:56:33",
"set": "1,633.21",
"value": "44,406.70",
"twod": "16",
"is_result": "off"
},
{
"time": "10:56:30",
"set": "1,633.21",
"value": "44,384.39",
"twod": "14",
"is_result": "off"
},
{
"time": "10:56:18",
"set": "1,633.24",
"value": "44,384.39",
"twod": "44",
"is_result": "off"
},
{
"time": "10:56:03",
"set": "1,633.68",
"value": "44,345.72",
"twod": "85",
"is_result": "off"
}
]
}
]
This api can get this history of stock in a day. For History of stock change in a day
curl https://api.thaistock2d.com/history | json_pp
Here's some example Json
[
{
"date": "2021-11-05",
"child": [
{
"time": "15:11:52",
"set": "1,625.46",
"value": "48,896.35",
"twod": "66"
},
{
"time": "15:11:45",
"set": "1,625.46",
"value": "48,869.17",
"twod": "69"
},
{
"time": "15:11:37",
"set": "1,625.58",
"value": "48,869.17",
"twod": "89"
},
{
"time": "15:11:30",
"set": "1,625.58",
"value": "48,810.02",
"twod": "80"
},
{
"time": "15:11:22",
"set": "1,626.39",
"value": "48,810.02",
"twod": "90"
},
{
"time": "15:11:15",
"set": "1,626.39",
"value": "48,779.29",
"twod": "99"
},
{
"time": "15:11:07",
"set": "1,626.45",
"value": "48,779.29",
"twod": "59"
},
{
"time": "15:11:00",
"set": "1,626.45",
"value": "48,724.67",
"twod": "54"
},
{
"time": "12:11:36",
"set": "1,622.89",
"value": "35,906.55",
"twod": "96"
},
{
"time": "12:11:06",
"set": "1,622.89",
"value": "35,905.51",
"twod": "95"
}
]
}
]
This api can get this history of stock by date.
For History of stock change in that day https://api.thaistock2d.com/history?date=2021-11-05
curl https://api.thaistock2d.com/history?date=2021-11-05 | json_pp
Here's some example Json
[
{
"date": "2021-11-05",
"child": [
{
"time": "15:11:52",
"set": "1,625.46",
"value": "48,896.35",
"twod": "66"
},
{
"time": "15:11:45",
"set": "1,625.46",
"value": "48,869.17",
"twod": "69"
},
{
"time": "15:11:37",
"set": "1,625.58",
"value": "48,869.17",
"twod": "89"
},
{
"time": "15:11:30",
"set": "1,625.58",
"value": "48,810.02",
"twod": "80"
},
{
"time": "15:11:22",
"set": "1,626.39",
"value": "48,810.02",
"twod": "90"
},
{
"time": "15:11:15",
"set": "1,626.39",
"value": "48,779.29",
"twod": "99"
},
{
"time": "15:11:07",
"set": "1,626.45",
"value": "48,779.29",
"twod": "59"
},
{
"time": "15:11:00",
"set": "1,626.45",
"value": "48,724.67",
"twod": "54"
},
{
"time": "12:11:36",
"set": "1,622.89",
"value": "35,906.55",
"twod": "96"
},
{
"time": "12:11:06",
"set": "1,622.89",
"value": "35,905.51",
"twod": "95"
}
]
}
]