-
Notifications
You must be signed in to change notification settings - Fork 311
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
New funding-rate endpoint for mobula EA #3699
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: de512be The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
||
export const endpoint = new AdapterEndpoint({ | ||
name: 'funding-rate', | ||
aliases: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
const logger = makeLogger('MobulaStateFundingRate') | ||
|
||
export const EXCHANGES = ['binance', 'deribit'] as const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an env var?
"fundingTime": 1740441600000, | ||
"result": 0.009854, | ||
}, | ||
"result": 0.009854, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does our system handles decimals properly?
New Websocket API for Mobula to get funding rates of assets on different exchanges.
To subscribe to an asset, send a WS message once per connection like:
Thereafter, we will receive messages at a rate of 1 msg per second like:
which contains funding rates for both the
binance
andderibit
exchanges. We use thequeryDetails
to get the original symbol that we subscribed to in order to generate the EA results.Mobula does not support unsubscribes.