Initial pass at Synth-based ticker selection #1392

Merged
Shpigford merged 15 commits from synth-selector into main 2024-10-30 21:23:45 +08:00
Showing only changes of commit 2919084734 - Show all commits

View File

@@ -35,7 +35,7 @@ class Account::TradesController < ApplicationController
def securities
query = params[:q]
return render json: [] if query.blank? || query.length < 2
return render json: [] if query.blank? || query.length < 2 || query.length > 100
synth_client = Provider::Synth.new(ENV["SYNTH_API_KEY"])
@securities = synth_client.search_securities(query:, dataset: "limited", country_code: Current.family.country).securities