Bloomberg API for .NET
SendRequest Method (request, identity, eventQueue, correlationId, requestLabel)
NamespacesBloomberglp.BlpapiSessionSendRequest(Request, Identity, EventQueue, CorrelationID, String)
Sends the specified request to a service using this session.
Declaration Syntax
C#Visual BasicVisual C++
public CorrelationID SendRequest(
	Request request,
	Identity identity,
	EventQueue eventQueue,
	CorrelationID correlationId,
	string requestLabel
)
Public Function SendRequest ( 
	request As Request,
	identity As Identity,
	eventQueue As EventQueue,
	correlationId As CorrelationID,
	requestLabel As String
) As CorrelationID
public:
CorrelationID^ SendRequest(
	Request^ request, 
	Identity^ identity, 
	EventQueue^ eventQueue, 
	CorrelationID^ correlationId, 
	String^ requestLabel
)
Parameters
request (Request)
Filled in request that needs to be sent to the service.
identity (Identity)
A handle to the user whose privileges are to be used for this request.
eventQueue (EventQueue)
An event queue to be used to receive response events for this request.
correlationId (CorrelationID)
A correlationId to be used to match the response.
requestLabel (String)
A label that defines a string which will be recorded along with any diagnostics for this operation.
Return Value
CorrelationID
An internally generated CorrelationID if the specified correlationId is null or return the specified correlationId.
Remarks

This method sends the specified request to a service that is available on this session. The specified correlationId is returned on the response and can be used to correlate the response to this request. If a null correlationId is specified then an internal CorrelationID is generated and returned.

If a valid identity is specified then it used as authorization for the specified request. If a valid identity is not specified then the request runs with the default authorization. SendAuthorizationRequest for more information.

If an eventQueue is specified then all response events for this Request are published to this eventQueue. The user can block on this event queue for response and can use this as a mechanism to convert this asynchronous request into a synchronous request.

A successful request will generate zero or more PARTIAL_RESPONSE events followed by exactly one RESPONSE event. Once the final RESPONSE event has been received the CorrelationID associated with this request may be re-used. If the request fails at any stage a REQUEST_STATUS event will be generated after which the CorrelationId associated with the request may be re-used.

Exceptions
ExceptionCondition
InvalidOperationException The session is not started.
InvalidRequestException The request is not compliant with the schema for the request.
RequestQueueOverflowException This session has too many enqueued requests.
DuplicateCorrelationIDException The specified correlationId is already active for this Session.

Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.7.4.1