Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul futures asset config storage and usage within GCT #1691

Open
thrasher- opened this issue Oct 23, 2024 · 2 comments
Open

Overhaul futures asset config storage and usage within GCT #1691

thrasher- opened this issue Oct 23, 2024 · 2 comments
Labels

Comments

@thrasher-
Copy link
Collaborator

New Issue

Right now there's a lot of different asset types which GCT supports like asset.PerpetualFutures, asset.Futures, asset.CoinMarginedFutures, asset.DeliveryFutures, asset.PerpetualContract, asset.LinearContract etc. which can all be simplified.

For config storage of futures instruments and usage of them within GCT, we could make their storage/retrieval and usage more precise/informative by changing the way we store them as follows:

{
  "futuresContracts": {
    "perpetual": {
      "settlementTypes": [
        {
          "type": "linear",
          "currency": "USDT",
          "pairFormat": "{BASE}-USDT",
          "examplePair": "BTC-USDT"
        },
        {
          "type": "linear",
          "currency": "USDC",
          "pairFormat": "{BASE}-USDC",
          "examplePair": "BTC-USDC"
        },
        {
          "type": "inverse",
          "currency": "coin",
          "pairFormat": "{BASE}-USD",
          "examplePair": "BTC-USD"
        }
      ]
    },
    "futures/delivery/expiry (take your pick)": {
      "settlementTypes": [
        {
          "type": "linear",
          "currency": "USDT",
          "pairFormat": "{BASE}-USDT-{EXPIRY}",
          "examplePair": "BTC-USDT-29122024"
        },
        {
          "type": "linear",
          "currency": "USDC",
          "pairFormat": "{BASE}-USDC-{EXPIRY}",
          "examplePair": "BTC-USDC-29122024"
        },
        {
          "type": "inverse",
          "currency": "coin",
          "pairFormat": "{BASE}-USD-{EXPIRY}",
          "examplePair": "BTC-USD-29122024"
        }
      ]
    }
  }
}
@gbjk
Copy link
Collaborator

gbjk commented Nov 10, 2024

We're going to wait for #1671 before tackling this, since it'll make the work easier.

@gbjk
Copy link
Collaborator

gbjk commented Nov 13, 2024

Started to bleed into work that would become redundant after this during
config assetEnabled
I've branched it out to asset simplification and can fold that into this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To Do
Development

No branches or pull requests

2 participants