Forum Replies Created
-
AuthorPosts
-
Saar SaboParticipant
Hello
I wanted to know
How long does it take to access_token
And if there is validity to refresh_token key
And if there is, how long is valid
I want to make the API connection more friendlyJim TruscottParticipantIf I just post an authentication request before every data request, saves me having to write a bunch of code the check whether the access token is still valid. Any problems with that?
Refresh token would save me having send to username and password again but I still have to submit a sensitive client secret so not sure what that gains me?
Marc WardKeymasterAdam, thanks for writing. Currently access to use validation through the API is on a request basis. As a Center for Data Quality participant I’ve given you access and have sent further details to your email.
Marc WardKeymasterSaar – The tokens both have an expired_by value assigned when they’re assigned, for example, the access_token is valid for an hour.
Jim TruscottParticipantHaving double-checked the documentation (and run some never ending queries!), am I right in thinking that you cannot retrieve fact values directly with a ticker?
That you need to query the entity or report first to get an id to use in your fact request?
I guess confirming this?, I notice the google sheet exclusively uses CIK’s and where a ticker can be used as an input in BSCompare, a look up is made to a different url – https://csuite.xbrl.us (another API?).
Is this a better source of ticker/CIK mappings? If so, should we use this?
Jim TruscottParticipantWhat do these fields encapsulate?
report.restated-index
report.restatedWhat sort of values could we expect to see in these fields?
David TaurielloKeymasterreport.restated-index is a searchable integer –
/api/v1/report/search?report.restated-index=10&fields=report.*
returns a filing that was restated 10 times.we’re planning to convert report.restated to a boolean (from integer), so you’ll be able to query for the population of restated filings
David TaurielloKeymasteryou can search on
entity.ticker
to return facts, see
– https://xbrl.us/forums/topic/reports-and-periods/#post-113100That said, I wouldn’t advise it for heavy lifting as it can be a bit slow, which is why we’re returning tickers with the legacy API in the BScompare template. When the other endpoints are sunset in December, this one will likely remain available for several months into 2019.
Peter GuldbergParticipantI am not sure it will work much quicker, but you could also use:
=left(ImportXML("https://www.sec.gov/cgi-bin/browse-edgar?ticker="&D2&"&action=getcompany","//div/span/a[1]"),10)
in Google Sheets where cell D2 contains your ticker.
Peter GuldbergParticipantSo – I need to check if I am thinking about this correctly… The XBRL API connects to the XBRL US database which we as members have access to, but we should not rely on it as a long term solution for commercial use.
What are our options if we want to implement a local (to us) solution? Are we allowed to/can we copy the database and maintain it locally? – how do we get a hold of the API to connect it to our own database?
If we wanted to just store the zipped filings locally as described in Altova’s video, how would we be able to connect to that? The API would not work for connecting to those, right? Is that essentially what Raptor XML is for?
Saar SaboParticipantThere is a possibility to know how much property my request has
I want to import allconcept.local-name
but there are more than 100I think the
offset
does not work well if I understand correctly what it is supposed to doDavid TaurielloKeymasterIt would be best if you include code to check whether the token is valid instead of requesting a new token for each request – if you’ve got several calls and each requests a new token, you’ll bottleneck your returns and might impact others who are requesting resources.
Each token has a lifetime of an hour, after which you can use the refresh token to request a new access token.
David TaurielloKeymasterIncluding
ENDPOINT.offset(INTEGER)
as part of fields returns additional records not displayed by in the initial set (see 7 Handling Paging in the XBRL API Documentation for complete details).- Company and Institutional Members, as well as Sole Practitioner and Power User Individual Members can return unlimited results with 2,000 records per paged request.
- Basic Individual Members can return a maximum of 2,000 records with 500 records per page (4 pages).
- non-Members can return 1,000 records with 100 records per page (10 pages)
See https://xbrl.us/benefits for details and let me know if you have questions about XBRL US Membership.
Jim TruscottParticipantThanks for this. Makes sense David.
Can’t remember off the top of my head what markers exist in the SEC XBRL Spec. for restatements? Is there one at a filing level? Is that what is used if indeed it exists to calculate the restatement index or does it just count how many amended versions of the same report have been filed? e.g. 10-K/A. Or do amended filings actually represent unique reports so this is irrelevant? I’m waffling now so I’ll leave it for someone else to hopefully fill in the correct answer!
Saar SaboParticipantFunny but if you use this way
https://api.xbrl.us/api/v1/concept/search?dts.id=305444&concept.is-monetary=true&fields=concept.local-name,concept.balance-type.sort(ASC)
It does not work well withconcept.offset()
But use the way
https://api.xbrl.us/api/v1/concept/search?dts.id=305444&concept.is-monetary=true&fields=concept.local-name.sort(ASC),concept.balance-type
Works fineBut how can I know how much fields or offset There is in my request
I’m working on Add on
And I do not really know if the user has a Member or not
But I do need to know how I bring him all the information he can get
I do not want to use theconcept.limit(1)
andconcept.offset(i)
And check when I stop getting results In order to should know this is the end
It’s less Api friendlySorry for my English
-
AuthorPosts