Tradex - Forex Broker WordPress Theme #102222

Run Another Service Within Flask

Hello, I am having a problem with flask and quickfix. For those who don't know, quickfix is a python framework for creating FIX engines (FIX is a messaging protocol for financial services). My project started with a command line interface where I would start my quickfix app and keep a while loop asking for user input.
Now I must modify my project as a web app and decided to use flask. I set up a flask route to start the quickfix server but every time I access that API endpoint from Postman, my flask server dies, sometimes with a buffer overflow error and sometimes it does not give me any error messages.
Here is my flask code (it is very basic). The route that is causing the problem now is "/api/start_fix/" at flask_api.py:
from flask import Flask, render_template import fixapp from types import SimpleNamespace app = Flask(__name__) fix_handle = None @app.route('/') def home(): return "

This is a sample

" @app.route('/api/start_fix/',methods=['POST']) def start_fix(config_file): #these three lines below are temporary and circling each other. args = vars(fixapp.get_default_args()) args['config'] = config_file args['verbose'] = 3 args = SimpleNamespace(**args) fix_handle = fixapp.create_fix_app(args,fix_mode='manual') fix_handle.start() return "SUCCESS" @app.route('/api/start_quote/',methods=["POST"]) def start_quote(symbol): options = {'55':symbol} fix_handle.send_subscribe_to_data(options) @app.route('/api/get_ticks',methods=['GET']) def get_ticks(): return fix_handle.get_ticks() #get_ticks should return a json object @app.route('/api/get_ticks/',methods=['GET']) def get_ticks_by_size(size): return fix_handle.get_ticks(size=size) #should be json if __name__ == '__main__': app.run(debug=True)
fixapp is my implementation with quickfix and structured as a python package. I was hoping to use fix_handle to access data from within it through flask but the server crashes right at the beginning.
I will include a snippet of the function fix_handle.start() in case it is useful even though it is very short fixapp/session_object.py:
class SessionBase(object): """Base session object. It will be used to initialized most of the session object parameters""" def __init__(self,args): self.args = args self.config_file = args.config self.settings = fix.SessionSettings(self.config_file) self.decoder = FixDecoder() self.datastream = DataStream() self.orderstore = OrderStore() self.storeFactory = fix.FileStoreFactory(self.settings) self.logFactory = fix.FileLogFactory(self.settings) def start(self): """Initiate FIX app and do nothing else. This will only work if the child class has implemented the self.app and self.initiator""" try: self.initiator.start() time.sleep(1) print("FIX application has started...") #fixapp.utils.fix_started_msg() except (fix.ConfigError , fix.RuntimeError) as e: print(e) . . . 

self.initiator.start() is a function from the quickfix library and not implemented by me.
Also, to make it more clear, I want to remind that fixapp will start a process on its own and a server connection to a forex broker. This functionality used to work well from the command line but from within flask it can't work.
I looked into using threading or multi-threading libraries and was thinking of starting a new thread for each time my flask endpoint is sent a request, but it is still unclear to me how I could communicate with my quickfix process. Quickfix needs to be running in the background and those flask endpoints simply redirect to it. Quickfix will be continuously collecting FOREX data from the market.
I guess this is more about how to approach my problem by running quickfix from inside flask so that users of the web app can interact with it.
I would appreciate if someone can help me with this issue and if I wasn't clear or there is more information needed, please let me know.
submitted by esidehustle to flask [link] [comments]

The Most Powerful Forex Trading Indicator Non Repaint Metatrader 4 Free Download 2020 cTrader Web - Templates market maker template Forex Broker Inc. - YouTube Best Website Template - YouTube

Forex.com has limited language support compared to other platforms, just offering English and Chinese. In terms of availability, it is a proprietary platform from GAIN Capital, meaning that Forex.com is the only broker that supports the use of the Forex.com web, mobile, and advanced trading platforms. All created by our Global Community of independent Web Designers and Developers. Filter & Refine. Sort by: Best ... Monee - Forex and Stock Broker HTML Template. by Indonez in Business $18. 71 Sales. Show more. Preview. 71 Sales. Last updated: 3 Mar 20. UIkit 3 css framework; Sass included; Suite for forex broker and introducing broker; Tags: forex, business, commodities, consultant, crypto ... Use the Inestio WordPress theme to give your business website a professional and stylish look. This is a multi-purpose WordPress theme with a collection of 4+ homepage layouts. The theme is good for getting started with marketing, SEO, web design, graphics, or any other type of niche web resource. Trade currencies on FOREX.com’s high performance web-based platform. No plugins or downloads required. All created by our Global Community of independent Web Designers and Developers. Filter & Refine. Sort by: Best ... Monee - Forex and Stock Broker HTML Template. by Indonez in Business $18. 70 Sales. Show more. Preview. 70 Sales. Last updated: 3 Mar 20. UIkit 3 css framework; Sass included; Suite for forex broker and introducing broker; Tags: forex, trading, business, commodities, consultant ... ForexBrokerWebsite offers top level Forex website designing solutions, services as well as Forex CRM support at an affordable price. +442036952310 +971 54433 5310 +1 647 8724111; System Status Support; Part Of ; [email protected]; [email protected]; Home; Web Solutions. Readymade Broker Sites Standard Broker Sites Custom Development Portfolio. Broker CRM. PrixCRM Standard PrixCRM ... Get 16 forex broker website templates on ThemeForest. Buy forex broker website templates from $11. All created by our Global Community of independent Web Designers and Developers.

[index] [19375] [26494] [7171] [189] [28866] [29133] [8428] [6455] [25822] [27212]

The Most Powerful Forex Trading Indicator Non Repaint Metatrader 4 Free Download 2020

Sign in to like videos, comment, and subscribe. Sign in. Watch Queue Queue Save any chart set up for easy future access, and set different templates as default. Learn to work with charts in NetTradeX: choose an instrument and open a chart, set up a chart type, time interval and the window type. You can see more detai... Basic MARKET MAKER TEMPLATE And Forex Stop Hunting - Duration: 12:28. Stacey Burke Trading 12,027 views. 12:28. Secrets of a Market Maker No One Else Will Share... - Duration: 49:03. MetaStock ... ForexBrokerInc Chart Template - Duration: 95 seconds. Forex Broker Inc. 292 views; 4 years ago; 1:33 . ForexbrokerInc Market Watch Tutorial - Duration: 93 seconds. Forex Broker Inc. 221 views; 4 ... Go Markets is recognised as the broker who successfully launched MT4 in Australia, back in 2006. At Go Markets, you get access to a wide range of global markets including: Forex; "Forex and Binary options trading carry a high level of risk and can result in the loss of all your fund.You should never invest money that you cannot afford to lose." 🔴 About: SAM Trading Tips ...

https://binary-optiontrade.weidesis.ml