pub struct LighterExecClientConfig {Show 15 fields
pub trader_id: TraderId,
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 environment: LighterEnvironment,
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§
§trader_id: TraderIdTrader identifier.
account_id: AccountIdAccount identifier on the venue.
account_index: Option<u64>Lighter account index (numeric, assigned at registration). Falls back
to LIGHTER_ACCOUNT_INDEX / LIGHTER_TESTNET_ACCOUNT_INDEX when
resolved through common::credential.
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 LIGHTER_API_KEY_INDEX /
LIGHTER_TESTNET_API_KEY_INDEX when resolved through
common::credential.
private_key: Option<String>Hex-encoded private key for the API key (Schnorr / ecgfp5). Falls back
to LIGHTER_API_SECRET / LIGHTER_TESTNET_API_SECRET when resolved
through common::credential.
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.
environment: LighterEnvironmentTarget environment.
http_timeout_secs: u64HTTP request timeout in seconds.
ws_timeout_secs: u64WebSocket connect 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 LighterExecClientConfig
impl LighterExecClientConfig
Sourcepub fn builder() -> LighterExecClientConfigBuilder
pub fn builder() -> LighterExecClientConfigBuilder
Create an instance of LighterExecClientConfig using the builder syntax
Source§impl LighterExecClientConfig
impl LighterExecClientConfig
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.
Trait Implementations§
Source§impl ClientConfig for LighterExecClientConfig
impl ClientConfig for LighterExecClientConfig
Source§impl Clone for LighterExecClientConfig
impl Clone for LighterExecClientConfig
Source§fn clone(&self) -> LighterExecClientConfig
fn clone(&self) -> LighterExecClientConfig
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 LighterExecClientConfig
impl Debug for LighterExecClientConfig
Source§impl Default for LighterExecClientConfig
impl Default for LighterExecClientConfig
impl DerefToPyAny for LighterExecClientConfig
Source§impl<'de> Deserialize<'de> for LighterExecClientConfigwhere
LighterExecClientConfig: Default,
impl<'de> Deserialize<'de> for LighterExecClientConfigwhere
LighterExecClientConfig: 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 LighterExecClientConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for LighterExecClientConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for LighterExecClientConfig
impl<'py> IntoPyObject<'py> for LighterExecClientConfig
Source§type Target = LighterExecClientConfig
type Target = LighterExecClientConfig
Source§type Output = Bound<'py, <LighterExecClientConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <LighterExecClientConfig 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 LighterExecClientConfig
impl PyClass for LighterExecClientConfig
Source§impl PyClassImpl for LighterExecClientConfig
impl PyClassImpl for LighterExecClientConfig
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 = <<LighterExecClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LighterExecClientConfig>
type Layout = <<LighterExecClientConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LighterExecClientConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForLighterExecClientConfig
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 LighterExecClientConfig
impl PyClassNewTextSignature for LighterExecClientConfig
const TEXT_SIGNATURE: &'static str = "(trader_id, 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)"
Source§impl PyStubType for LighterExecClientConfig
impl PyStubType for LighterExecClientConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for LighterExecClientConfig
impl PyTypeInfo for LighterExecClientConfig
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 LighterExecClientConfig
impl RefUnwindSafe for LighterExecClientConfig
impl Send for LighterExecClientConfig
impl Sync for LighterExecClientConfig
impl Unpin for LighterExecClientConfig
impl UnsafeUnpin for LighterExecClientConfig
impl UnwindSafe for LighterExecClientConfig
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
§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