Enum Class BrokerApiEnvironment

java.lang.Object
java.lang.Enum<BrokerApiEnvironment>
markets.alpaca.client.BrokerApiEnvironment
All Implemented Interfaces:
Serializable, Comparable<BrokerApiEnvironment>, Constable

public enum BrokerApiEnvironment extends Enum<BrokerApiEnvironment>
Selects between the Alpaca sandbox and production Broker REST API endpoints.
  • Enum Constant Details

    • SANDBOX

      public static final BrokerApiEnvironment SANDBOX
      broker-api.sandbox.alpaca.markets — Broker sandbox endpoint.
    • PRODUCTION

      public static final BrokerApiEnvironment PRODUCTION
      broker-api.alpaca.markets — production Broker endpoint.
  • Method Details

    • values

      public static BrokerApiEnvironment[] 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

      public static BrokerApiEnvironment valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • baseUrl

      public String baseUrl()
      Returns the REST API base URL for this environment.
    • from

      public static BrokerApiEnvironment from(String value)
      Parses a user-provided environment value.

      Accepted values are sandbox, production, prod, and live.