- class services.perpetual.api.gateway.objects.AssetOraclePrice
Represents a collection of signed oracle prices of a single synthetic asset and their median price value. The median price is stored in the base class.
The definition of a legal median value x: half the values are <= x and half of them are >= x.
price (int) – The median price value. The definition of a legal median value x: half the values are <= x and half of them are >= x.
SignedOraclePrice]) – A dictionary from the public key of the signer to a signed oracle price object.
- class services.perpetual.api.gateway.objects.FundingIndicesState
Represents a collection of timestamped global funding indices for all assets.
indices (Mapping[int, int]) – Maps each synthetic asset to its funding index in quantized units of the collateral token, such as USDC. A 64-bit fixed-point signed number, with 32 bits after the decimal point.
timestamp (int) – The new system time, in seconds since the Unix epoch. Specifies seconds since the Unix epoch. A 32-bit number.
- class services.perpetual.api.gateway.objects.Order
OrderType) – order type.
nonce (int) – Unique nonce issued by the caller.
public_key (int) – Public key of the party as registered on the StarkEx contract.
amount_synthetic (int) – Amount of synthetic asset in the order, after applying the resolution factor.
amount_collateral (int) – Amount of collateral asset in the order, after applying the resolution factor.
amount_fee (int) – The fee limit for this order.
asset_id_synthetic (int) – The asset ID of the synthetic asset participating in this order, as registered on the contract.
asset_id_collateral (int) – The asset ID of the collateral participating in this order, as registered on the contract,
position_id (int) – Position ID used for the trade.
is_buying_synthetic (int) – A flag to indicate whether the order is for buying the synthetic amount or selling the synthetic amount.
expiration_timestamp (int) – The timestamp after which this request is no longer valid. Specifies hours since the Unix epoch. A 32-bit number.
Signature) – Signature of the party that issued this order.
- class services.perpetual.api.gateway.objects.OrderType(value)
- LIMIT_ORDER_WITH_FEES = 0
- class services.perpetual.api.gateway.objects.Signature
Represents a STARK-friendly ECDSA signature.
r (int) – 1st ECDSA signature component.
s (int) – 2nd ECDSA signature component.
- class services.perpetual.api.gateway.objects.SignedOraclePrice
Represents a single signed Oracle Price per unit.
price (int) – The signed price.
TimestampedSignature) – Represents a timestamped STARK-friendly ECDSA signature.
external_asset_id (int) – Concatenation of the asset name and the oracle name (both in hex encoding).
- class services.perpetual.api.gateway.objects.TimestampedSignature
Represents a STARK-friendly ECDSA signature which was signed at a certain timestamp.
Signature) – Represents a STARK-friendly ECDSA signature.
timestamp (int) – The time the signature was created. Specifies seconds since the Unix epoch. A 32-bit number.
- class services.everest.api.gateway.set_config_request.AlternativeEndpointSettingRequest(url: str, failure_description_url: Optional[str] = None, bearer_token: Optional[str] = None, server_certificate: Optional[str] = None, client_certificate: Optional[str] = None, client_key: Optional[str] = None)
This type of request is allowed only in setups that support dynamically configuring the endpoint for alternative transactions.
AlternativeEndpointSettingRequest is sent from the client to the gateway when the configuration of the alternative transaction request endpoint is changed. The client should provide either of the following: A bearer token, or client and server certificates.
url (str) – The URL of the endpoint.
failure_description_url (str) – The URL address that receives the failure description.
bearer_token (Optional[str]) – The Bearer token.
server_certificate (Optional[str]) – The server certificate.
client_certificate (Optional[str]) – The client certificate.
client_key (Optional[str]) – The client private key.