Skip to content

FTX Exchange Implemented #663

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

Merged
merged 33 commits into from
Sep 28, 2021
Merged

Conversation

Plumbly
Copy link
Contributor

@Plumbly Plumbly commented Sep 27, 2021

This should be the FTX exchange now implemented as per #634.

Plumbly and others added 30 commits August 11, 2021 23:46
ParseOrder method in the ExchangeKrakenAPI class will now parse the fee from the response and set it in the order result.
Added a exchange property to the ticker model to be able to identify what exchange it came from.
Added the base implementation for the FTX exchange.
Implemented onGetMarketSynbolsAsync  method for FTX  exchange
Implemented OnGetMarketSymbolsMetadataAsync for FTX exchange
Modified ,methods to exclude to futures symbols
Added method for creating the appropriate signature on the request so that it can authenticate against the private API for the FTX exchange

Implemented the OnGetAmountsAsync method for the FTX exchange.
Implemented ongetHistoricaltrades for the FTX exchange.
Modified onGetHistoricalTrade to use utility method for parsing.
Moved methods into alphabetical order
Implemented websocket connection for retrieving ticker information.
Refined websocket ticker implementation to make use of utility functions for parsing.
* checks for future coins
Implemented onPlaceOrderAsync for FTX exchange.
Added remaining overrides of methods required to be implemented to FTX exchange
Added implementation of OnCancelOrderAsync
Added implementation of OnGetCandleAsync
Implemented getOrderBook for FTX exchange.
Implemented GetCompletedOrders method for FTX exchange
Implemented GetTickersAsync method for FTX
Fixed minor issues in some of the methods
Modified order of methods so they are alphabetical
Removed debug test class.
Added FTX to supported exchanges
Modified OnGetOrderDetailsAsync for ftx exchange to include isClientOrderId parameter
Removed unused Models folder
@@ -22,6 +22,12 @@
<RepositoryType>git</RepositoryType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<Compile Remove="API\Exchanges\FTX\Models\**" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you're specifying these in the csproj?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, think I accidentally added it while removing an unused folder I added.

/// <summary>
/// The name of the exchange the tick was sent from.
/// </summary>
public string Exchange { get; set; }
Copy link
Collaborator

@vslee vslee Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you'd like to add this property, can you go through all of the other exchanges and set it? (you can do it quickly by using "find references" in Visual Studio.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I thought I had actually done this by adding the logic on a utility method for parsing the ticker, but hadn't realised not all exchanges make use of it.

// "size": 31431.0,
// "reduceOnly": false,
// "ioc": false,
// "postOnly": false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this exchange supports postOnly. Can you add that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{
// https://docs.ftx.com/#get-order-status

JToken result = await MakeJsonRequestAsync<JToken>($"/orders/{orderId}", null, await GetNoncePayloadAsync());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also handle the case where isClientOrderId is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Modified exchange tickers to include the name of the exchange it came from for all exchange implementations.
Added  PostOnly parameter to place order method for FTX implementation.
Modified GetOrderDetails for FTX implementation so that it handles retrieval via client order ids.
Removed unnecessary exclusion in project file
Fixed issue with reference to the exchange name in Gemini when creating a ticker instance.
@Plumbly
Copy link
Contributor Author

Plumbly commented Sep 28, 2021

Believe that should be all the requested modifications completed.

@vslee vslee merged commit 890b000 into DigitalRuby:master Sep 28, 2021
@vslee vslee linked an issue Oct 7, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FTX API Implementation
3 participants