{"id":14190,"date":"2022-08-27T02:50:45","date_gmt":"2022-08-27T02:50:45","guid":{"rendered":"https:\/\/tradeui.com\/?p=12411"},"modified":"2022-08-27T02:50:45","modified_gmt":"2022-08-27T02:50:45","slug":"upcoming-earnings-api","status":"publish","type":"post","link":"https:\/\/tradeui.com\/new\/blog\/upcoming-earnings-api","title":{"rendered":"Upcoming Earnings API"},"content":{"rendered":"<h2>Upcoming Earning API<\/h2>\n<p>This free API returns the upcoming earnings for the company of interest.<\/p>\n<div>\n<div>To return ALL symbols by date yyyy-mm-dd:<\/div>\n<div><code>https:\/\/ab.tradeui.com\/api\/earnings.php?date=2022-08-25<\/code><\/div>\n<\/div>\n<p>To return one symbol:<br \/>\n<code><a href=\"https:\/\/ab.tradeui.com\/api\/earnings.php?symbol=ACST\" rel=\"nofollow\">https:\/\/ab.tradeui.com\/api\/earnings.php?symbol=ACST<\/a><\/code><\/p>\n<p>If you want to return symbols that start with one to three letters use this endpoint:<\/p>\n<p dir=\"auto\"><a href=\"https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=A\" rel=\"nofollow\">https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=A<\/a><\/p>\n<p dir=\"auto\"><a href=\"https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=BA\" rel=\"nofollow\">https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=BA<\/a><\/p>\n<p dir=\"auto\"><a href=\"https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=BAC\" rel=\"nofollow\">https:\/\/ab.tradeui.com\/api\/earnings.php?symbolstart=BAC<\/a><\/p>\n<p dir=\"auto\"><span class=\"b\">The first endpoint will return a JSON object like this example:<br \/>\n[<\/span><span class=\"blockInner\"><span class=\"kvov arrElem\"><span class=\"b\">{<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">symbol<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;ACST&#8221;<\/span>,<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">earning_time<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;1&#8221;<\/span>,<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">earning_date<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;2022-08-11&#8221;<\/span>,<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">MarketCap<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;39529200&#8221;<\/span>,<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">optionable<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;0&#8221;<\/span>,<\/span><span class=\"kvov objProp\">&#8220;<span class=\"k\">last_updated<\/span>&#8220;:\u00a0<span class=\"s\">&#8220;2022-08-21 19:10:46&#8221;<\/span><\/span><span class=\"b\">}<\/span><\/span><\/span><span class=\"b\">]<br \/>\nEarning time is either 1 before market open, 2 after market close or 3 not provided.<\/span><\/p>\n<p dir=\"auto\">check out our github for code sample <a href=\"https:\/\/github.com\/tradeui\/tradeui\">https:\/\/github.com\/tradeui\/tradeui<\/a><\/p>\n<p>Also provided below:\u00a0<code><br \/>\n# make sure you install requests first using: pip install requests<br \/>\nimport requests<br \/>\nsymbol = \"TSLA\"<br \/>\nx = requests.get(f'https:\/\/ab.tradeui.com\/api\/earnings.php?symbol={symbol}')<br \/>\n#return the status code a 200 means the request was successful<br \/>\nprint(x.status_code)<br \/>\n# return the response in json format:<br \/>\nprint(x.json())<\/code><\/p>\n<p>&nbsp;<\/p>\n<p dir=\"auto\"><strong>Terms of use\u00a0<\/strong><br \/>\nTo use the API please insert a link in your site footer back to <a href=\"https:\/\/tradeui.com\" rel=\"nofollow\">TradeUI.com\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Upcoming Earning API This free API returns the upcoming earnings for the company of interest. To return ALL symbols by date yyyy-mm-dd: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":12312,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","footnotes":""},"categories":[4532,4626,4551,4632],"tags":[4627,4628,4629,4630,4631,4633,4634],"class_list":["post-14190","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-dev","category-finance","category-tutorials","tag-earnings","tag-earnings-api","tag-free-api","tag-free-earnings-api","tag-github-api","tag-upcoming-earnings","tag-upcoming-earnings-api","pmpro-has-access"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/posts\/14190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/comments?post=14190"}],"version-history":[{"count":0,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/posts\/14190\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/media\/12312"}],"wp:attachment":[{"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/media?parent=14190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/categories?post=14190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tradeui.com\/new\/wp-json\/wp\/v2\/tags?post=14190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}