Mapping

Rate-Limited Methods

OpenFIGI.Mapping.instrument_mappingMethod
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 (see OpenFIGI.mapping_channel())
  • jobs::Channel{MappingJob}: the jobs to send to the mapping endpoint
  • results::Channel{<:AbstractResponse}: the mapping results in the same order as jobs

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.

source

Direct Methods

Responses

Enumeration Values

OpenFIGI.mapping_valuesFunction
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()

source
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")
end

See mapping_values(key)

source