A Swift package for connecting and trading on crypto exchanges such as Kucoin and Binance.
💰 It can calculate the stop and limit prices for a trailing stop strategy based on a set of given input parameters.
Refer to SwiftTrader+TrailingStop.swift
🤖 Supports being deployed to Heroku (Linux). Tested with Vapor. This means trading automation by using webhooks and scripts such as the Profit Percentage Tracker (TradingView). #ka-ching!
📖 List of working APIs:
Kucoin Futures | Explanation | API Documentation |
---|---|---|
SwiftTrader.kucoinFuturesAccountOverview |
Retrieves the overview of a Kucoin Futures account. | https://docs.kucoin.com/futures/#account |
SwiftTrader.kucoinFuturesStopOrderList |
Retrieves the list of un-triggered stop orders. | https://docs.kucoin.com/futures/#get-untriggered-stop-order-list |
SwiftTrader.kucoinFuturesOrderList |
Retrieves the list of active Futures orders. | https://docs.kucoin.com/futures/#get-order-list |
SwiftTrader.kucoinFuturesPlaceStopLimitOrder |
Places a Futures stop limit order. | https://docs.kucoin.com/futures/#place-an-order |
SwiftTrader.kucoinFuturesCancelStopOrders |
Cancels all untriggered Futures stop orders of a given symbol (contract). | https://docs.kucoin.com/futures/#stop-order-mass-cancelation |
SwiftTrader.kucoinFuturesPositionList |
Lists open Futures positions. | https://docs.kucoin.com/futures/#get-position-list |
Kucoin Spot | Explanation | API Documentation |
---|---|---|
SwiftTrader.kucoinSpotListAccounts |
Gets the list of accounts. | https://docs.kucoin.com/#list-accounts |
SwiftTrader.kucoinSpotGetAccount |
Retrieves information for a single account. | https://docs.kucoin.com/#get-an-account |
SwiftTrader.kucoinSpotGetTransferable |
Returns the transferable balance of a specified account. | https://docs.kucoin.com/#get-the-transferable |
SwiftTrader.kucoinSpotPlaceStopLimitOrder |
Places a spot stop limit order. | https://docs.kucoin.com/#place-a-new-order |
SwiftTrader.kucoinSpotOrderList |
Lists active Spot orders. | https://docs.kucoin.com/#list-orders |
SwiftTrader.kucoinSpotStopOrderList |
Lists active Spot stop orders. | https://docs.kucoin.com/#list-stop-orders |
SwiftTrader.kucoinSpotCancelStopOrders |
Cancels all untriggered stop orders of a given symbol (contract). | https://docs.kucoin.com/#cancel-orders |
Binance Spot | Explanation | API Documentation |
---|---|---|
SwiftTrader.binanceSpotNewOrder |
Send in a new order. Currently only MARKET orders are supported (but this can be easily changed). |
https://binance-docs.github.io/apidocs/spot/en/#new-order-trade |
Explanation | API Documentation | |
---|---|---|
SwiftTrader.ftxTriggerOrdersList |
||
SwiftTrader.ftxPositions |
||
SwiftTrader.ftxPlaceStopLimitOrder |
||
SwiftTrader.cancelAllOrders |