Package markets.alpaca.client
Enum Class BrokerApiEnvironment
- All Implemented Interfaces:
Serializable,Comparable<BrokerApiEnvironment>,Constable
Selects between the Alpaca sandbox and production Broker REST API endpoints.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionbroker-api.alpaca.markets— production Broker endpoint.broker-api.sandbox.alpaca.markets— Broker sandbox endpoint. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the REST API base URL for this environment.static BrokerApiEnvironmentParses a user-provided environment value.static BrokerApiEnvironmentReturns the enum constant of this class with the specified name.static BrokerApiEnvironment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SANDBOX
broker-api.sandbox.alpaca.markets— Broker sandbox endpoint. -
PRODUCTION
broker-api.alpaca.markets— production Broker endpoint.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
baseUrl
Returns the REST API base URL for this environment. -
from
Parses a user-provided environment value.Accepted values are
sandbox,production,prod, andlive.
-