Skip to content

Instantly share code, notes, and snippets.

View Archetapp's full-sized avatar
😎
Just swiftin'

Jared Davidson Archetapp

😎
Just swiftin'
View GitHub Profile

Polymarket BTC 5-Minute Up/Down Trading Bot — Build Guide

What This Bot Does

This bot trades Polymarket's "BTC Up or Down" 5-minute binary markets. Every 5 minutes, Polymarket opens a market asking: "Will BTC be higher or lower than the opening price when this 5-minute window closes?" You buy "Up" or "Down" tokens at some price (e.g. $0.50–$0.95), and if you're right, each token pays out $1.00. If you're wrong, you lose your bet.

The bot uses technical analysis on real-time Binance BTC price data to predict the outcome, then places the trade on Polymarket right before the window closes — when we have the most information but (ideally) before the token price has fully priced in the outcome.


@Archetapp
Archetapp / SplitView.swift
Last active November 2, 2025 21:32
A split view similar to Abode. (Added keyboard avoidance logic.)
import SwiftUI
// MARK: - Component
fileprivate struct SplitViewConfig {
let topDetentRatio: CGFloat
let bottomDetentRatio: CGFloat
let elasticThreshold: CGFloat
let elasticResistance: CGFloat
let snapThreshold: CGFloat
#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
using namespace metal;
float2 distort(float2 uv, float strength) {
float2 dist = 0.5 - uv;
uv.x = (uv.x - dist.y * dist.y * dist.x * strength);
uv.y = (uv.y - dist.x * dist.x * dist.y * strength);
return uv;
@Archetapp
Archetapp / JaredUI.FullscreenSheet.swift
Last active January 28, 2025 16:05
Fullscreen Sheet
// JaredUI.Sheet.swift
// JaredUI
//
// Created by Jared Davidson on 1/28/25.
import SwiftUI
import UIKit
public enum JaredUI { }
import Foundation
import SwiftUI
import UIKit
import os
extension UINavigationController: UIGestureRecognizerDelegate {
override open func viewDidLoad() {
super.viewDidLoad()
self.hidesBarsOnSwipe = false
setupFullWidthBackGesture()
@Archetapp
Archetapp / NetworkSpeedManager.swift
Created October 16, 2020 00:14
Network Speed Tester
//
// NetworkSpeedManager.swift
// Archetapp
//
// Created by Jared on 10/15/20.
// Copyright © 2020 Archetapp. All rights reserved.
//
import Foundation
import UIKit