Skip to content

Commit 81b1584

Browse files
committed
BFP-4121: Split exchange api into common and pro
1 parent 675a031 commit 81b1584

3 files changed

Lines changed: 327 additions & 327 deletions

File tree

resources/bluefin-api.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,25 @@ paths:
135135
$ref: "./account-data-api.yaml#/paths/~1api~1v1~1accounts~1leaderboard"
136136

137137
/v1/exchange/depth:
138-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1depth"
138+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1depth"
139139
/v1/exchange/ticker:
140-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1ticker"
140+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1ticker"
141141
/v1/exchange/tickers:
142-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1tickers"
142+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1tickers"
143143
/v1/exchange/info:
144-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1info"
144+
$ref: "./exchange-pro-api.yaml#/paths/~1v1~1exchange~1info"
145145
/v1/exchange/trades:
146-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1trades"
146+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1trades"
147147
/v1/exchange/candlesticks:
148-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1candlesticks"
148+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1candlesticks"
149149
/v1/exchange/fundingRateHistory:
150-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1fundingRateHistory"
150+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1fundingRateHistory"
151151
/v1/exchange/stats:
152-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1stats"
152+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1stats"
153153
/v1/exchange/stats/allTime:
154-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1stats~1allTime"
154+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1stats~1allTime"
155155
/v1/exchange/country:
156-
$ref: "./exchange-api.yaml#/paths/~1v1~1exchange~1country"
156+
$ref: "./exchange-common-api.yaml#/paths/~1v1~1exchange~1country"
157157

158158
/api/v1/trade/leverage:
159159
$ref: "./trade-api.yaml#/paths/~1api~1v1~1trade~1leverage"
Lines changed: 1 addition & 317 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,12 @@
11
openapi: 3.0.3
22
info:
3-
title: Bluefin Exchange API
3+
title: Exchange API
44
description: Exchange Info Endpoints |
55
All numeric quantities are represented as string in e9 format.
66
version: 1.0.0
77

8-
servers:
9-
- url: https://api.{env}.bluefin.io
10-
variables:
11-
env:
12-
default: sui-staging
13-
enum:
14-
- sui-staging
15-
- sui-prod
16-
178
components:
189
schemas:
19-
ExchangeInfoResponse:
20-
type: object
21-
properties:
22-
assets:
23-
type: array
24-
description: List of assets available on the exchange.
25-
items:
26-
$ref: "#/components/schemas/AssetConfig"
27-
contractsConfig:
28-
$ref: "#/components/schemas/ContractsConfig"
29-
markets:
30-
type: array
31-
description: List of markets available on the exchange.
32-
items:
33-
$ref: "#/components/schemas/Market"
34-
tradingGasFeeE9:
35-
type: string
36-
description: Current gas fee set for subsidized trades (e9 format)
37-
serverTimeAtMillis:
38-
type: integer
39-
format: int64
40-
description: Server time in milliseconds.
41-
timezone:
42-
type: string
43-
description: Timezone of the exchange.
44-
required:
45-
- assets
46-
- markets
47-
- tradingGasFeeE9
48-
- serverTimeAtMillis
49-
- timezone
50-
5110
OrderbookDepthResponse:
5211
type: object
5312
properties:
@@ -384,14 +343,6 @@ components:
384343
items:
385344
$ref: "#/components/schemas/FundingRateEntry"
386345

387-
MarketStatus:
388-
type: string
389-
enum:
390-
- ACTIVE
391-
- BETA
392-
- MAINTENANCE
393-
- DELISTED
394-
- UNSPECIFIED
395346
KlineInterval:
396347
type: string
397348
enum:
@@ -425,258 +376,6 @@ components:
425376
- "Oracle"
426377
- "Mark"
427378
- "UNSPECIFIED"
428-
ContractsConfig:
429-
type: object
430-
description: Contract configuration for the exchange.
431-
required:
432-
- edsId
433-
- idsId
434-
- network
435-
- baseContractAddress
436-
- currentContractAddress
437-
- operators
438-
properties:
439-
edsId:
440-
type: string
441-
example: "0x7c723c16bc4a4d3e1067360de6963cfdfbdc51a128563fe052cb4f8f00d6150b"
442-
description: External Data Store Address
443-
idsId:
444-
type: string
445-
example: "0x7c723c16bc4a4d3e1067360de6963cfdfbdc51a128563fe052cb4f8f00d6150b"
446-
description: External Data Store Address
447-
network:
448-
type: string
449-
enum: [mainnet, testnet, devnet]
450-
description: Network environment
451-
baseContractAddress:
452-
type: string
453-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
454-
description: Base contract address
455-
currentContractAddress:
456-
type: string
457-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
458-
description: Current contract address
459-
operators:
460-
$ref: "#/components/schemas/Operators"
461-
Operators:
462-
type: object
463-
required:
464-
- admin
465-
- operator
466-
- sequencer
467-
- funding
468-
- fee
469-
properties:
470-
admin:
471-
type: string
472-
description: Admin operator address
473-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
474-
operator:
475-
type: string
476-
description: General operator address; AKA Guardian
477-
deprecated: true
478-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
479-
sequencer:
480-
type: string
481-
description: Sequencer operator address
482-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
483-
funding:
484-
type: string
485-
description: Funding operator address
486-
deprecated: true
487-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
488-
fee:
489-
type: string
490-
description: Fee operator address
491-
deprecated: true
492-
example: "0xa6b939f57595fed2ae10ae4f3a37a410c94e5bdb7dde2e547022d1fe1b9791d0"
493-
AssetConfig:
494-
type: object
495-
properties:
496-
assetType:
497-
type: string
498-
description: The bank address of the asset.
499-
symbol:
500-
type: string
501-
description: Asset symbol.
502-
example: USDC
503-
decimals:
504-
type: integer
505-
format: int64
506-
description: Default precision for rendering this asset.
507-
example: 6
508-
weight:
509-
type: string
510-
description: Weight applied to asset to use as margin in Multi-Assets mode.
511-
example: 1.0
512-
marginAvailable:
513-
type: boolean
514-
description: Indicates if the asset can be used as margin in Multi-Assets mode.
515-
required:
516-
- assetType
517-
- symbol
518-
- decimals
519-
- weight
520-
- marginAvailable
521-
522-
Market:
523-
type: object
524-
properties:
525-
symbol:
526-
type: string
527-
description: Symbol of the market.
528-
example: BTC-PERP
529-
marketAddress:
530-
type: string
531-
description: Market address.
532-
example: 0x123
533-
status:
534-
$ref: "#/components/schemas/MarketStatus"
535-
baseAssetSymbol:
536-
type: string
537-
description: Base asset symbol.
538-
baseAssetName:
539-
type: string
540-
description: Base asset name.
541-
baseAssetDecimals:
542-
type: integer
543-
format: int64
544-
description: Precision of the base asset.
545-
stepSizeE9:
546-
type: string
547-
description: Step size for the quantity (e9 format).
548-
example: 10000000
549-
tickSizeE9:
550-
type: string
551-
description: Price increment size (e9 format).
552-
example: 10000000
553-
minOrderQuantityE9:
554-
type: string
555-
description: Minimum order size (e9 format).
556-
example: 20000000
557-
maxLimitOrderQuantityE9:
558-
type: string
559-
description: Maximum limit order size (e9 format).
560-
example: 25000000000
561-
maxMarketOrderQuantityE9:
562-
type: string
563-
description: Maximum market order size (e9 format).
564-
example: 250000000000
565-
minOrderPriceE9:
566-
type: string
567-
description: Minimum order price (e9 format).
568-
example: 10000000
569-
maxOrderPriceE9:
570-
type: string
571-
description: Maximum order price (e9 format).
572-
example: 10000000000
573-
maintenanceMarginRatioE9:
574-
type: string
575-
description: Maintenance margin ratio (MMR, e9 format).
576-
example: 30000000
577-
initialMarginRatioE9:
578-
type: string
579-
description: Initial margin ratio (IMR), e9 format).
580-
example: 45000000
581-
insurancePoolRatioE9:
582-
type: string
583-
description: Insurance pool ratio (e9 format).
584-
example: 3000000
585-
defaultLeverageE9:
586-
type: string
587-
description: Default leverage (e9 format).
588-
example: 3000000000
589-
maxNotionalAtOpenE9:
590-
type: array
591-
description: Maximum notional value at current leverage. Index 0 is max notional value for leverage set to 1x, index 1 is for leverage 2x, etc...
592-
items:
593-
type: string
594-
minTradeQuantityE9:
595-
type: string
596-
description: Minimum trade quantity allowed (e9 format).
597-
example: 10000000
598-
maxTradeQuantityE9:
599-
type: string
600-
description: Max trade quantity allowed (e9 format).
601-
example: 100000000000
602-
minTradePriceE9:
603-
type: string
604-
description: Minimum trade price allowed (e9 format).
605-
example: 50000000000
606-
maxTradePriceE9:
607-
type: string
608-
description: Maximum trade price allowed (e9 format).
609-
example: 50000000000000
610-
maxFundingRateE9:
611-
type: string
612-
description: Maximum allowed funding rate (e9 format).
613-
example: 1000000
614-
defaultMakerFeeE9:
615-
type: string
616-
description: Default maker fee (e9 format).
617-
example: 150000
618-
defaultTakerFeeE9:
619-
type: string
620-
description: Default taker fee (e9 format).
621-
example: 550000
622-
insurancePoolAddress:
623-
type: string
624-
description: Insurance pool address.
625-
feePoolAddress:
626-
type: string
627-
description: Fee pool address.
628-
tradingStartTimeAtMillis:
629-
type: string
630-
description: The time when trading will start/have started on the market.
631-
example: 1724121094751
632-
mtbLongE9:
633-
type: string
634-
description: Maximum take bound for long positions (e9 format).
635-
example: 20000000
636-
mtbShortE9:
637-
type: string
638-
description: Maximum take bound for short positions (e9 format).
639-
example: 20000000
640-
delistingPriceE9:
641-
type: string
642-
description: Delisting price (e9 format).
643-
example: 200000000
644-
isolatedOnly:
645-
type: boolean
646-
description: Indicates whether the market only allows isolated margin.
647-
required:
648-
- symbol
649-
- marketAddress
650-
- status
651-
- baseAssetSymbol
652-
- baseAssetName
653-
- baseAssetDecimals
654-
- stepSizeE9
655-
- tickSizeE9
656-
- minOrderQuantityE9
657-
- maxLimitOrderQuantityE9
658-
- maxMarketOrderQuantityE9
659-
- minOrderPriceE9
660-
- maxOrderPriceE9
661-
- maintenanceMarginRatioE9
662-
- initialMarginRatioE9
663-
- insurancePoolRatioE9
664-
- defaultLeverageE9
665-
- maxNotionalAtOpenE9
666-
- minTradeQuantityE9
667-
- maxTradeQuantityE9
668-
- minTradePriceE9
669-
- maxTradePriceE9
670-
- maxFundingRateE9
671-
- defaultMakerFeeE9
672-
- defaultTakerFeeE9
673-
- insurancePoolAddress
674-
- feePoolAddress
675-
- tradingStartTimeAtMillis
676-
- mtbLongE9
677-
- mtbShortE9
678-
- delistingPriceE9
679-
- isolatedOnly
680379

681380
FundingRateEntry:
682381
properties:
@@ -795,21 +494,6 @@ components:
795494
- isBlockedCountry
796495

797496
paths:
798-
/v1/exchange/info:
799-
get:
800-
tags:
801-
- Exchange
802-
operationId: getExchangeInfo
803-
summary: /exchange/info
804-
description: Returns the current exchange information including available margin assets, markets, and rules.
805-
responses:
806-
"200":
807-
description: Successful response
808-
content:
809-
application/json:
810-
schema:
811-
$ref: "#/components/schemas/ExchangeInfoResponse"
812-
813497
/v1/exchange/depth:
814498
get:
815499
tags:

0 commit comments

Comments
 (0)