Show / Hide Table of Contents

Class EnvironmentExtensions

Set of extensions methods for replacing target URL for Alpaca data streaming client ( IAlpacaDataStreamingClient) with custom values or with local proxy WebSocket URL obtained from environment variables.

Inheritance
System.Object
EnvironmentExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class EnvironmentExtensions

Methods

| Improve this Doc View Source

WithProxyForAlpacaDataStreamingClient(IEnvironment)

Replaces AlpacaDataStreamingApi from environment variable named DATA_PROXY_WS with default fallback value equal to default Alpaca proxy agent local URL (ws://127.0.0.1:8765).

Declaration
public static IEnvironment WithProxyForAlpacaDataStreamingClient(this IEnvironment environment)
Parameters
Type Name Description
IEnvironment environment

Original environment URLs for modification.

Returns
Type Description
IEnvironment

New environment URLs object.

| Improve this Doc View Source

WithProxyForAlpacaDataStreamingClient(IEnvironment, Uri)

Replaces AlpacaDataStreamingApi value with the alpacaProxyAgentUrl value or from environment variable named DATA_PROXY_WS with default fallback value equal to default Alpaca proxy agent local URL (ws://127.0.0.1:8765).

Declaration
public static IEnvironment WithProxyForAlpacaDataStreamingClient(this IEnvironment environment, Uri alpacaProxyAgentUrl)
Parameters
Type Name Description
IEnvironment environment

Original environment URLs for modification.

Uri alpacaProxyAgentUrl

New value for the AlpacaDataStreamingApi property in the modified environment object.

Returns
Type Description
IEnvironment

New environment URLs object.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX