pub struct LighterExecutionClientConfig {Show 16 fields
pub environment: LighterEnvironment,
pub deployment: LighterDeployment,
pub venue: Option<Venue>,
pub account_id: AccountId,
pub account_index: Option<u64>,
pub api_key_index: Option<u8>,
pub private_key: Option<String>,
pub base_url_http: Option<String>,
pub base_url_ws: Option<String>,
pub proxy_url: Option<String>,
pub http_timeout_secs: u64,
pub ws_timeout_secs: u64,
pub market_order_slippage_bps: u32,
pub rest_quota_per_min: Option<u32>,
pub sendtx_quota_per_min: Option<u32>,
pub transport_backend: TransportBackend,
}Expand description
Configuration for the Lighter execution client.
Fields§
§environment: LighterEnvironmentTarget environment within the selected deployment.
deployment: LighterDeploymentLighter protocol deployment, which controls endpoint defaults and protocol settings.
venue: Option<Venue>Optional Nautilus venue identifier override.
This scopes instruments, cache entries, and execution routing without changing the deployment’s signing, settlement, or protocol behavior.
account_id: AccountIdAccount identifier on the venue. Its issuer must match the resolved venue.
account_index: Option<u64>Lighter account index (numeric, assigned at registration). Falls back
to the environment variable selected by deployment and environment.
api_key_index: Option<u8>API key index for a user-created Lighter key. Low indexes are reserved
for Lighter clients; 255 is the apikeys all-keys sentinel. Falls back
to the environment variable selected by deployment and environment.
private_key: Option<String>Hex-encoded private key for the API key (Schnorr / ecgfp5). Falls back
to the environment variable selected by deployment and environment.
base_url_http: Option<String>Optional REST URL override.
base_url_ws: Option<String>Optional WebSocket URL override.
proxy_url: Option<String>Optional proxy URL for HTTP and WebSocket transports.
http_timeout_secs: u64HTTP request timeout in seconds.
ws_timeout_secs: u64WebSocket connection and reconnection timeout in seconds.
market_order_slippage_bps: u32Slippage buffer in basis points for market-style orders.
rest_quota_per_min: Option<u32>Optional REST read-bucket quota override in requests per minute; unset keeps the conservative 60 req/min default (raising it requires venue IP registration).
sendtx_quota_per_min: Option<u32>Optional transaction quota override (req/min), independent of rest_quota_per_min;
unset keeps 60. Enforced across the HTTP and WebSocket sendTx paths (execution only).
transport_backend: TransportBackendWebSocket transport backend.
Implementations§
Source§impl LighterExecutionClientConfig
impl LighterExecutionClientConfig
Sourcepub fn builder() -> LighterExecutionClientConfigBuilder
pub fn builder() -> LighterExecutionClientConfigBuilder
Create an instance of LighterExecutionClientConfig using the builder syntax
Source§impl LighterExecutionClientConfig
impl LighterExecutionClientConfig
Sourcepub fn has_credentials(&self) -> bool
pub fn has_credentials(&self) -> bool
Returns true when all fields required to sign and submit
authenticated transactions are configured.
Lighter signing requires the private key, the account index, and the API key index together; any missing field invalidates the credential.
Sourcepub fn resolved_venue(&self) -> Venue
pub fn resolved_venue(&self) -> Venue
Returns the configured venue or the deployment default.
Sourcepub fn settlement_currency(&self) -> Currency
pub fn settlement_currency(&self) -> Currency
Returns the deployment settlement currency.
Trait Implementations§
Source§impl ClientConfig for LighterExecutionClientConfig
impl ClientConfig for LighterExecutionClientConfig
Source§impl Clone for LighterExecutionClientConfig
impl Clone for LighterExecutionClientConfig
Source§fn clone(&self) -> LighterExecutionClientConfig
fn clone(&self) -> LighterExecutionClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LighterExecutionClientConfig
impl Debug for LighterExecutionClientConfig
impl DerefToPyAny for LighterExecutionClientConfig
Source§impl<'de> Deserialize<'de> for LighterExecutionClientConfigwhere
LighterExecutionClientConfig: Default,
impl<'de> Deserialize<'de> for LighterExecutionClientConfigwhere
LighterExecutionClientConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'a, 'py> FromPyObject<'a, 'py> for LighterExecutionClientConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for LighterExecutionClientConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for LighterExecutionClientConfig
impl<'py> IntoPyObject<'py> for LighterExecutionClientConfig
Source§type Target = LighterExecutionClientConfig
type Target = LighterExecutionClientConfig
Source§type Output = Bound<'py, <LighterExecutionClientConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <LighterExecutionClientConfig as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for LighterExecutionClientConfig
impl PyClass for LighterExecutionClientConfig
Source§impl PyClassImpl for LighterExecutionClientConfig
impl PyClassImpl for LighterExecutionClientConfig
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Configuration for the Lighter execution client.
const RAW_DOC: &'static CStr = /// Configuration for the Lighter execution client.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<LighterExecutionClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LighterExecutionClientConfig>
type Layout = <<LighterExecutionClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LighterExecutionClientConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForLighterExecutionClientConfig
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for LighterExecutionClientConfig
impl PyClassNewTextSignature for LighterExecutionClientConfig
const TEXT_SIGNATURE: &'static str = "(account_id, account_index=None, api_key_index=None, private_key=None, base_url_http=None, base_url_ws=None, proxy_url=None, environment=None, http_timeout_secs=None, ws_timeout_secs=None, market_order_slippage_bps=None, rest_quota_per_min=None, sendtx_quota_per_min=None, transport_backend=None, deployment=None, venue=None)"
Source§impl PyStubType for LighterExecutionClientConfig
impl PyStubType for LighterExecutionClientConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for LighterExecutionClientConfig
impl PyTypeInfo for LighterExecutionClientConfig
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.Auto Trait Implementations§
impl Freeze for LighterExecutionClientConfig
impl RefUnwindSafe for LighterExecutionClientConfig
impl Send for LighterExecutionClientConfig
impl Sync for LighterExecutionClientConfig
impl Unpin for LighterExecutionClientConfig
impl UnsafeUnpin for LighterExecutionClientConfig
impl UnwindSafe for LighterExecutionClientConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
self into a [Py<PyAny>] when the underlying conversion is infallible.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more