This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scope.soldierDateA = function (soldier) { | |
| const soldierData = $scope.todayDate - soldier.start; | |
| const soldierSrok = soldier.stop - soldier.start; | |
| if(soldierData> soldierSrok) | |
| { | |
| return { | |
| "color" : "red", | |
| "background-color" : "white" | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ccxt = require('ccxt'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| order_price = order_1['price'] * amount | |
| transfer_1 = amount * (1 - COMMISSION) | |
| transfer_2 = transfer_1 / order_2['price'] * (1 - COMMISSION) | |
| transfer_3 = transfer_2 / order_3['price'] * (1 - COMMISSION) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_amount(): | |
| amount_3 = order_3['amount'] * order_3['price'] | |
| amount_2 = order_2['amount'] if order_2['amount'] < amount_3 else amount_3 | |
| amount_2 = amount_2 * order_2['price'] | |
| return order_1['amount'] if order_1['amount'] < amount_2 else amount_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for active in MAIN_ACTIVE: | |
| for (currency_1, currencies_1) in orders.items(): | |
| for (currency_2, order) in currencies_1.items(): | |
| if currency_2 == active or currency_1 == active: | |
| continue | |
| order_1 = orders[active][currency_1] | |
| order_2 = order | |
| order_3 = orders[currency_2][active] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "pair": "BTC_ETH", | |
| "price": 14490.6535285, | |
| "amount": 0.013802 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "pair": "BTC_ETH", | |
| "price": 0.00007600, | |
| "amount": 1164 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create_dictionary(pairs): | |
| order_book = polo.returnOrderBook(depth=1) | |
| dictionary = collections.defaultdict(dict) | |
| for pair in pairs: | |
| p = pair.upper() | |
| src, dst = split(p) | |
| ask_order = order_book[p]['asks'][0] | |
| src_ask = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def coin_pairs(): | |
| with open(CONFIG_FILE) as file_data: | |
| data = json.load(file_data) | |
| return data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Getter | |
| @AllArgsConstructor | |
| @EqualsAndHashCode | |
| @ToString | |
| public class Person | |
| { | |
| private final String firstName; | |
| private final String lastName; |
NewerOlder