-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/dexalot #9
Feat/dexalot #9
Conversation
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.
Tested and confirmed working by QA.
- Successfully cloned and installed branch
- Setup and run gateway, no issues found
- Export needed variables and run endpoints for network and clob routes and confirmed working
…h_update Batch order creation and cancelation for CLOB and injective
[ch-37162] |
This pull request has been linked to Shortcut Story #37162: Create Dexalot Connector in Gateway. |
…at/add-sushiswap-networks
(fix) don't decrement nonce
…/add-sushiswap-networks
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.
Requested some minor changes. Rest LGTM.
export const OrderType1 = { | ||
MARKET: 0, | ||
LIMIT: 1, | ||
STOP: 2, // not used | ||
STOPLIMIT: 3, // not used | ||
}; | ||
|
||
export const OrderType2 = { | ||
GTC: 0, // Good Till Cancel, | ||
FOK: 1, // Fill or Kill - requires immediate full fill or reverts | ||
IOC: 2, // Immediate or Cancel - gets any fills & then canceled Remaining will not go in the orderbook | ||
PO: 3, // Post Only - Requires to go in the orderbook without any fills or reverts | ||
}; |
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.
Is there a better description for these 2 order types? i.e.
OrderType
to determine between LIMIT
, MARKET
, etc
AdditionalOrderOptions
to determine GTC
, PO
, etc
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.
done
I used TimeInForce
instead of AdditionalOrderOptions
export const parseMarkerInfo = (marketInfo: MarketInfoStruct) => { | ||
return { | ||
baseSymbol: toUtf8(marketInfo.baseSymbol), | ||
quoteSymbol: toUtf8(marketInfo.quoteSymbol), | ||
buyBookId: toUtf8(marketInfo.buyBookId), | ||
sellBookId: toUtf8(marketInfo.sellBookId), | ||
minTradeAmount: marketInfo.minTradeAmount.toString(), | ||
maxTradeAmount: marketInfo.maxTradeAmount.toString(), | ||
auctionPrice: marketInfo.auctionPrice.toString(), | ||
auctionMode: marketInfo.auctionMode, | ||
makerRate: marketInfo.makerRate / 10000, // https://github.com/Dexalot/contracts/blob/1ec4b732b06dd2a25fe666cfde5b619af5b6f20b/contracts/TradePairs.sol#L43 | ||
takerRate: marketInfo.takerRate / 10000, // https://github.com/Dexalot/contracts/blob/1ec4b732b06dd2a25fe666cfde5b619af5b6f20b/contracts/TradePairs.sol#L43 | ||
baseDecimals: marketInfo.baseDecimals, | ||
baseDisplayDecimals: marketInfo.baseDisplayDecimals, | ||
quoteDecimals: marketInfo.quoteDecimals, | ||
quoteDisplayDecimals: marketInfo.quoteDisplayDecimals, | ||
allowedSlippagePercent: marketInfo.allowedSlippagePercent, | ||
addOrderPaused: marketInfo.addOrderPaused, | ||
pairPaused: marketInfo.pairPaused, | ||
postOnly: marketInfo.postOnly, | ||
}; | ||
}; |
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.
I would classify this function and those defined below to be util functions and thus it should not be found in a constants file.
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.
done
src/connectors/dexalot/dexalot.ts
Outdated
// this._exchangeContract = this.getContract('ExchangeSub', this._resources); | ||
this._portfolioContract = this.getContract('PortfolioSub', this._resources); | ||
// this._orderBooksContract = this.getContract('OrderBooks', this._resources); | ||
this._tradePairsContract = this.getContract('TradePairs', this._resources); | ||
// this._gasStationContract = this.getContract('GasStation', this._resources); |
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.
Please do remove these comments, I don't think they are being used or are useful for future reference
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.
done
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.
Changes LGTM
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.
Recent changes LGTM!
closing in favour of hummingbot#65 |
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
This is the main pr for Dexalot gateway. The functionality of this connector can be accessed through the endpoints on the club routes combined with the endpoints on the network routes.
Hence, the qa should test the following endpoints:
Notes for QA
The flow from creation to cancellation of orders is as follows:
[POST] /clob/orders
or/clob/batchOrders
with the createOrderParams. You will get a response similar to the one below[GET] /clob/orders
using your public key address and the ClientOrderId returned in the response to create orders. By doing this, you'll be able to see the id (i.e. exchangeOrderId)