LogoLogo
  • HXRO NETWORK
    • Welcome to Hxro Network
    • Market Protocols
      • Derivatives Trading
      • Betting
        • SAMM Protocol Litepaper - v1.1
    • Network Fees
  • TOKENOMICS AND STAKING
    • HXRO Token
    • Network Staking
    • Liquidity Pools
    • How-To
      • Transfer HXRO from ERC20 to SPL via Wormhole
      • Claim an esHXRO Airdrop
      • How to Stake HXRO
      • How to Vest esHXRO
      • How to Initialize and Claim Rewards
  • NETWORK REWARDS AND INCENTIVES
    • Rewards
    • Volume Incentives
    • Staking Incentives
      • Stake Delegation
  • DEVELOPERS
    • Derivatives Tooling
      • Python & Typescript SDKs
      • Dexterity Typescript SDK QuickStart
      • Dexterity Typscript Scripts
      • DEX Reference Implementations
    • Parimutuel Tooling
      • Typescript SDK
      • Python SDK
      • Parimutuel Typescript SDK QuickStart
      • Parimutuel Typescript + React Project
        • Config.tsx
        • PariBox.tsx
        • PlacePositionBox.tsx
        • PlacePosition.tsx
    • Developer Grants
      • Developer Grant FAQs
    • Oracles
  • Traders
    • FAQs
  • MARKET MAKERS
    • Market Maker Reference Implementation
  • Security
    • Staking Contract Audit
  • External Links
    • Website
    • Governance, Staking, and Rewards Portal
    • Github
    • Forum
    • Twitter
    • Discord
    • Brand Kit
      • Brand and Press
Powered by GitBook
On this page
  • Introduction
  • Connectivity
  • Some technical bits
  • Creating a TRG and accessing the market
  1. DEVELOPERS
  2. Derivatives Tooling

Python & Typescript SDKs

Last updated 1 year ago

Introduction

This guide is intended for participants of our Dexterity Beta to programmatically connect to the market and start trading. Note that participation to our beta program requires a whitelist token. Please get in touch on if you are interested in joining the program.

Connectivity

While we eventually plan to host or provided self hosted REST/Websocket access to the market, currently the only provided mechanisms via which to connect are a Python & a Typescript SDK. Both of these are available in the usual library repositories.

Some technical bits

You can find a much more in-depth technical description in the dexterity for the purposes of connecting it's important to understand two fundamental concepts in dexterity, that of the market product group and trader risk group. The market product group (MPG) represents a selection of actively traded products where cross-margining can take place. Products are dynamic in the sense that some products in a group will expire and new ones will get created, obviously some like a perpetual future can exist in perpetuity. The MPG is generally created and maintained by the network. The trader risk group (TRG) represents the trader's deposits, orders, positions and overall risk in the instruments of a specific MPG. This should be created by the trader as it will be linked to the trader's wallet.

Creating a TRG and accessing the market

Discovery steps

  • Find out the program ids being used in the deployment from the Hxro team. The programs you will need the ids of are:

    • DEX

    • AGNOSTIC_ORDERBOOK

    • RISK_ENGINE

    • FEES

    • INSTRUMENTS

  • Then also find out what the current MPG being used in the beta is.

Python SDK

Typescript SDK

Install via Pypi and follow instructions provided

Install via NPM and follow instructions provided

Discord
whitepaper
,
here
here