Package markets.alpaca.client.ws
Enum Class TradingEnvironment
- All Implemented Interfaces:
Serializable,Comparable<TradingEnvironment>,Constable
Selects between the Alpaca live and paper trading WebSocket endpoints.
Note: on the paper endpoint, trade_updates messages are sent as binary frames. The
client handles this transparently by decoding them as UTF-8 text.
-
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 updates.api.alpaca.markets— live brokerage account updates. -
Method Summary
Modifier and TypeMethodDescriptionurl()Returns the full WebSocket URL for this environment.static TradingEnvironmentReturns the enum constant of this class with the specified name.static TradingEnvironment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRODUCTION
api.alpaca.markets— live brokerage account updates. -
PAPER
paper-api.alpaca.markets— paper trading account updates.
-
-
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
-
url
Returns the full WebSocket URL for this environment.
-