Skip to content

Conversation

@wwestgarth-enclave
Copy link
Contributor

Description

Problem:
We have the endpoint v1/perps/contracts that contain useful market data for each perpetual-futures markets. The end-point also contains an isClosed field which can be used to determine whether the underlying market for RWA's are closed.

Given we want to roll out more RWA alpha-strats etc. etc. it would make sense for this field to be available to any strat-managers that are using the python client.

Solution:
Add methods on the enclave-python client to call into the contracts endpoint. I have also added the equivalent endpoint for spot markets.

Testing/Examples:
Locally ran the following:

def main():

    # create a client
    enclave_client = Client(API_KEY, API_SECRET, enclave.models.SANDBOX)
    if not enclave_client.wait_until_ready():
        raise RuntimeError("Enclave not connecting.")
    
    print(enclave_client.perps.get_contracts().json())
    print(enclave_client.spot.get_ticker().json())

@wwestgarth-enclave wwestgarth-enclave requested a review from a team as a code owner June 4, 2025 10:05
@wwestgarth-enclave wwestgarth-enclave merged commit 55a9165 into main Jun 9, 2025
1 check passed
@wwestgarth-enclave wwestgarth-enclave deleted the wwestgarth/add-contracts-endpoint branch June 9, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants