Mapping
Rate-Limited Methods
OpenFIGI.Mapping.instrument_mapping — Method
instrument_mapping(tasks, jobs)Submits jobs to the mapping endpoint as scheduled by tasks
Arguments
tasks::Channel{Task}: a rate-limited channel for scheduling API requests (seeOpenFIGI.mapping_channel())jobs::Vector{MappingJob}: the jobs to send to the mapping endpoint
Internally, this method uses instrument_mapping(tasks, jobs, results) for the batching logic.
OpenFIGI.Mapping.instrument_mapping — Method
instrument_mapping(tasks, job)Submits job to the mapping endpoint as scheduled by tasks
Arguments
tasks::Channel{Task}: a rate-limited channel for scheduling API requests (seeOpenFIGI.mapping_channel())job::MappingJob: the job to send to the mapping endpoint
Internally, this method uses instrument_mapping(tasks, jobs).
OpenFIGI.Mapping.instrument_mapping — Method
instrument_mapping(tasks, identifier, properties...)Submits a MappingJob constructed from identifer and properties to the mapping endpoint as scheduled by tasks
Arguments
tasks::Channel{Task}: a rate-limited channel for scheduling API requests (seeOpenFIGI.mapping_channel())job::MappingJob: the job to send to the mapping endpoint
Internally, this method uses instrument_mapping(tasks, job).
OpenFIGI.Mapping.instrument_mapping — Method
instrument_mapping(tasks, jobs, results)Spawn a instrument_mapping task that processes jobs in batches and populates results
Arguments
tasks::Channel{Task}: a rate-limited channel for scheduling API requests (seeOpenFIGI.mapping_channel())jobs::Channel{MappingJob}: the jobs to send to the mapping endpointresults::Channel{<:AbstractResponse}: the mapping results in the same order asjobs
The task returned from this method is bound to results. If one of the batches should error, there will be fewer items in results than jobs. To detect the error state, simply wait on the task after consuming the values in results.
Direct Methods
OpenFIGI.Mapping.instrument_mapping — Method
instrument_mapping(jobs)Makes a single mapping request from jobs to the OpenFIGI API
While this method works fine for a single request, instrument_mapping(tasks, jobs) is preferred for most use cases for the convenience of batching and abiding by the rate limits.
Responses
OpenFIGI.Instrument — Type
Instrument object returned from the OpenFIGI API
OpenFIGI.DataResponse — Type
OpenFIGI API response with instruments
OpenFIGI.ErrorResponse — Type
OpenFIGI API response indicating an error with the request
OpenFIGI.WarningResponse — Type
OpenFIGI API response when no FIGI is found
Enumeration Values
OpenFIGI.mapping_values — Function
mapping_values(key)Send a single API request to mapping/values/key to obtain enum-like values for key. Used implicitly via cache_enums
See cache_enums()
mapping_values(tasks, key)Send a single API request to mapping/values/key respecting the rate limits enforced by tasks. Equivalent to mapping_values(key) up to the rate limits imposed by tasks.
Where possible or practical, this method is preferred.
id_values = mapping_channel() do ch
return mapping_values(ch, "idType")
endOpenFIGI.ValuesResponse — Type
OpenFIGI API response enumeration values