arbitrage.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:txpoloniex 作者: congruency 项目源码 文件源码
def find_routes(primaries, currencies, pairs):
    """
    Find all permutations of trade routes for pairs
    """
    discovered = []
    for c in currencies:

        for p in permutations(c, 3):

            # We want to end with the beginning currency
            p = p + (p[0],)

            if not p in discovered and \
               has_two_primary(primaries, p) and \
               valid_pairs(pairs, p):

                discovered.append(p)

                yield p
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号