Trading Webhook Relay and CSV Logger

Job ID: 40238531

Budget: $750 – $1,500 USD

Build a small reliability-critical relay service between **TradingView webhook → SignalStack execution**.

The service must:

1. Receive webhook JSON
2. Forward it unchanged to SignalStack
3. Log each event into an auto-growing CSV dataset (Excel-ready)
4. Prevent duplicate processing
5. Run continuously and safely (24/7 trading environment)

This is infrastructure plumbing — not a trading bot, UI, or analytics system.

Example Input

```json
{"symbol":"CADH2026","quantity":1,"action":"buy","strategy_code":40217,"position_id":"40217_17022026_0600","bucket":"IW_LONG"}
```

Extra fields may appear and must not break forwarding.

---

Requirements

-Webhook Endpoint

* POST `/webhook`
* Validate JSON
* Shared secret authentication
* Proper HTTP responses

Forwarding

* Forward payload unchanged to configurable SignalStack URL
* Timeout handling
* Do not crash if downstream unavailable

Logging

Append each event to CSV (Excel-safe escaping):

Required fields:

* timestamp_received (UTC)
* symbol
* quantity
* action
* strategy_code
* position_id
* bucket
* raw_json
* forward_status

SQLite optional but welcome.

dempotency (critical)

Duplicate webhook deliveries must not be forwarded or logged twice
(hash or ID-based dedup acceptable)

Configuration

Via `.env`:
SIGNALSTACK_URL, API_KEY, PORT, FILE_PATH, TIMEOUT

Deployment

Docker preferred or simple Windows service
Include setup instructions

---

Out of Scope

No UI, no analytics, no broker integration, no dashboards.

---

Deliverables

Code + run instructions + example config.

---

Required Proposal Answers

(automatic filtering)

1. How will you implement idempotency?
2. How do you prevent CSV corruption with concurrent requests?
3. What happens if the downstream webhook times out?

---

Candidate Level

Backend engineer with webhook / ingestion reliability experience.
Not suitable for beginners.

---