Package markets.alpaca.client
Enum Class TradingApiEnvironment
- All Implemented Interfaces:
Serializable,Comparable<TradingApiEnvironment>,Constable
Selects between the Alpaca paper and production Trading 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 ConstantDescriptionpaper-api.alpaca.markets— paper trading account endpoint.api.alpaca.markets— live trading account endpoint. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the REST API base URL for this environment.static TradingApiEnvironmentParses a user-provided environment value.static TradingApiEnvironmentReturns the enum constant of this class with the specified name.static TradingApiEnvironment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PAPER
paper-api.alpaca.markets— paper trading account endpoint. -
PRODUCTION
api.alpaca.markets— live trading account 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
paper,production,prod, andlive.
-